Skip to contentSkip to conversation

Add sc16is7x2 driver

PATCH New Manuel Stahl 1 participant 1 message Aug 31, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add sc16is7x2 driver

This patch adds support for the sc16is7x2 chips.

---
 drivers/serial/Kconfig        |    7 +
 drivers/serial/Makefile       |    1 +
 drivers/serial/sc16is7x2.c    | 1351 
+++++++++++++++++++++++++++++++++++++++++
 include/linux/serial_core.h   |    3 +
 include/linux/spi/sc16is7x2.h |   17 +
 5 files changed, 1379 insertions(+), 0 deletions(-)
drivers/serial/Kconfig +7 -0
index 12900f7..c336ea6 100644
@@ -269,6 +269,13 @@ config SERIAL_8250_RM9K
 
 comment "Non-8250 serial port support"
 
+config SERIAL_SC16IS7X2
+	tristate "SC16IS7x2 chips"
+	depends on SPI_MASTER && GPIOLIB
+	select SERIAL_CORE
+	help
+	  gpio driver for SC16IS7x2 SPI UARTs.
+
 config SERIAL_AMBA_PL010
 	tristate "ARM AMBA PL010 serial port support"
 	depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE)
drivers/serial/Makefile +1 -0
index 1ca4fd5..4c6a297 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
 obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
 obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
 obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
+obj-$(CONFIG_SERIAL_SC16IS7X2)	+= sc16is7x2.o
 obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
 obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
 obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
drivers/serial/sc16is7x2.c new file +1351 -0

1,351 lines not on this page · raw message

include/linux/serial_core.h +3 -0
index 64458a9..1869dcf 100644
@@ -46,6 +46,9 @@
 #define PORT_AR7	18	/* Texas Instruments AR7 internal UART */
 #define PORT_MAX_8250	18	/* max port ID */
 
+/* SC16IS7x2 SPI UART */
+#define PORT_SC16IS7X2	19
+
 /*
  * ARM specific type numbers.  These are not currently guaranteed
  * to be implemented, and will change in the future.  These are
include/linux/spi/sc16is7x2.h new file +17 -0
new file mode 100755
index 0000000..931fe50
@@ -0,0 +1,17 @@
+#ifndef LINUX_SPI_SC16IS752_H
+#define LINUX_SPI_SC16IS752_H
+
+#define SC16IS7X2_NR_GPIOS 8
+
+struct sc16is7x2_platform_data {
+	unsigned int	uartclk;
+	/* uart line number of the first channel */
+	unsigned	uart_base;
+	/* number assigned to the first GPIO */
+	unsigned	gpio_base;
+	char		*label;
+	/* list of GPIO names (array length = SC16IS7X2_NR_GPIOS) */
+	const char	*const *names;
+};
+
+#endif

begin:vcard
fn:Manuel Stahl
n:Stahl;Manuel
email;internet:[email protected]
tel;work:+49 911 58061-6419
x-mozilla-html:FALSE
version:2.1
end:vcard