Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7fff6f4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: Add missing entries to family name tables
  [NET]: Make NETDEVICES depend on NET.
  [IPV6]: endianness bug in ip6_tunnel
  [IrDA]: TOSHIBA_FIR depends on virt_to_bus
  [IrDA]: EP7211 IR driver port to the latest SIR API
  [IrDA] Typo fix in irnetlink.c copyright
  [NET]: Fix loopback crashes when multiqueue is enabled.
  [IPV4]: Fix inetpeer gcc-4.2 warnings
parents 6df8cd3d e51f802b
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,7 @@


menuconfig NETDEVICES
menuconfig NETDEVICES
	default y if UML
	default y if UML
	depends on NET
	bool "Network device support"
	bool "Network device support"
	---help---
	---help---
	  You can say N here if you don't intend to connect your Linux box to
	  You can say N here if you don't intend to connect your Linux box to
+10 −1
Original line number Original line Diff line number Diff line
@@ -155,6 +155,15 @@ config KINGSUN_DONGLE
	  To compile it as a module, choose M here: the module will be called
	  To compile it as a module, choose M here: the module will be called
	  kingsun-sir.
	  kingsun-sir.


config EP7211_DONGLE
	tristate "EP7211 I/R support"
	depends on IRTTY_SIR && ARCH_EP7211 && IRDA && EXPERIMENTAL
	help
	  Say Y here if you want to build support for the Cirrus logic
	  EP7211 chipset's infrared module.



comment "Old SIR device drivers"
comment "Old SIR device drivers"


config IRPORT_SIR
config IRPORT_SIR
@@ -355,7 +364,7 @@ config WINBOND_FIR


config TOSHIBA_FIR
config TOSHIBA_FIR
	tristate "Toshiba Type-O IR Port"
	tristate "Toshiba Type-O IR Port"
	depends on IRDA && PCI && !64BIT
	depends on IRDA && PCI && !64BIT && VIRT_TO_BUS
	help
	help
	  Say Y here if you want to build support for the Toshiba Type-O IR
	  Say Y here if you want to build support for the Toshiba Type-O IR
	  and Donau oboe chipsets. These chipsets are used by the Toshiba
	  and Donau oboe chipsets. These chipsets are used by the Toshiba
+1 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,7 @@ obj-$(CONFIG_MCP2120_DONGLE) += mcp2120-sir.o
obj-$(CONFIG_ACT200L_DONGLE)	+= act200l-sir.o
obj-$(CONFIG_ACT200L_DONGLE)	+= act200l-sir.o
obj-$(CONFIG_MA600_DONGLE)	+= ma600-sir.o
obj-$(CONFIG_MA600_DONGLE)	+= ma600-sir.o
obj-$(CONFIG_TOIM3232_DONGLE)	+= toim3232-sir.o
obj-$(CONFIG_TOIM3232_DONGLE)	+= toim3232-sir.o
obj-$(CONFIG_EP7211_DONGLE)	+= ep7211-sir.o
obj-$(CONFIG_KINGSUN_DONGLE)	+= kingsun-sir.o
obj-$(CONFIG_KINGSUN_DONGLE)	+= kingsun-sir.o


# The SIR helper module
# The SIR helper module
+89 −0
Original line number Original line Diff line number Diff line
/*
 * IR port driver for the Cirrus Logic EP7211 processor.
 *
 * Copyright 2001, Blue Mug Inc.  All rights reserved.
 * Copyright 2007, Samuel Ortiz <samuel@sortiz.org>
 */
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/init.h>
#include <linux/spinlock.h>

#include <net/irda/irda.h>
#include <net/irda/irda_device.h>

#include <asm/io.h>
#include <asm/hardware.h>

#include "sir-dev.h"

#define MIN_DELAY 25      /* 15 us, but wait a little more to be sure */
#define MAX_DELAY 10000   /* 1 ms */

static int ep7211_open(struct sir_dev *dev);
static int ep7211_close(struct sir_dev *dev);
static int ep7211_change_speed(struct sir_dev *dev, unsigned speed);
static int ep7211_reset(struct sir_dev *dev);

static struct dongle_driver ep7211 = {
	.owner		= THIS_MODULE,
	.driver_name	= "EP7211 IR driver",
	.type		= IRDA_EP7211_DONGLE,
	.open		= ep7211_open,
	.close		= ep7211_close,
	.reset		= ep7211_reset,
	.set_speed	= ep7211_change_speed,
};

static int __init ep7211_sir_init(void)
{
	return irda_register_dongle(&ep7211);
}

static void __exit ep7211_sir_cleanup(void)
{
	irda_unregister_dongle(&ep7211);
}

static int ep7211_open(struct sir_dev *dev)
{
	unsigned int syscon;

	/* Turn on the SIR encoder. */
	syscon = clps_readl(SYSCON1);
	syscon |= SYSCON1_SIREN;
	clps_writel(syscon, SYSCON1);

	return 0;
}

static int ep7211_close(struct sir_dev *dev)
{
	unsigned int syscon;

	/* Turn off the SIR encoder. */
	syscon = clps_readl(SYSCON1);
	syscon &= ~SYSCON1_SIREN;
	clps_writel(syscon, SYSCON1);

	return 0;
}

static int ep7211_change_speed(struct sir_dev *dev, unsigned speed)
{
	return 0;
}

static int ep7211_reset(struct sir_dev *dev)
{
	return 0;
}

MODULE_AUTHOR("Samuel Ortiz <samuel@sortiz.org>");
MODULE_DESCRIPTION("EP7211 IR dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-13"); /* IRDA_EP7211_DONGLE */

module_init(ep7211_sir_init);
module_exit(ep7211_sir_cleanup);
+1 −0
Original line number Original line Diff line number Diff line
@@ -77,6 +77,7 @@ typedef enum {
	IRDA_ACT200L_DONGLE      = 10,
	IRDA_ACT200L_DONGLE      = 10,
	IRDA_MA600_DONGLE        = 11,
	IRDA_MA600_DONGLE        = 11,
	IRDA_TOIM3232_DONGLE     = 12,
	IRDA_TOIM3232_DONGLE     = 12,
	IRDA_EP7211_DONGLE       = 13,
} IRDA_DONGLE;
} IRDA_DONGLE;


/* Protocol types to be used for SOCK_DGRAM */
/* Protocol types to be used for SOCK_DGRAM */
Loading