Skip to contentSkip to conversation

max3107: Abstract out the platform specific bits

PATCH New Alan Cox 1 participant 1 message Jun 30, 2010 TTY layer and serial drivers

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 2/2 max3107: Abstract out the platform specific bits

At the moment there is only one platform type supported and there is is hard wired, but with these changes the infrastructure is now there for anyone else to provide methods for their hardware.

---

 drivers/serial/Kconfig        |   21 +-
 drivers/serial/Makefile       |    1 
 drivers/serial/max3107-aava.c |  344 ++++++++++++++++++++++++++++++++++
 drivers/serial/max3107.c      |  413 ++++++++---------------------------------
 drivers/serial/max3107.h      |   85 ++++++++
 include/linux/serial_core.h   |    4 
 6 files changed, 531 insertions(+), 337 deletions(-)
 create mode 100644 drivers/serial/max3107-aava.c
drivers/serial/Kconfig +15 -6
index 525da12..b2c1fe6 100644
@@ -550,20 +550,29 @@ config SERIAL_S5PV210
 	help
 	  Serial port support for Samsung's S5P Family of SoC's
 
+
+config SERIAL_MAX3100
+	tristate "MAX3100 support"
+	depends on SPI
+	select SERIAL_CORE
+	help
+	  MAX3100 chip support
+
 config SERIAL_MAX3107
 	tristate "MAX3107 support"
-	depends on SPI && GPIOLIB
+	depends on SPI
 	select SERIAL_CORE
-	default y
 	help
 	  MAX3107 chip support
 
-config SERIAL_MAX3100
-	tristate "MAX3100 support"
-	depends on SPI
+config SERIAL_MAX3107_AAVA
+	tristate "MAX3107 AAVA platform support"
+	depends on X86_MRST && SERIAL_MAX3107 && GPIOLIB
 	select SERIAL_CORE
 	help
-	  MAX3100 chip support
+	  Support for the MAX3107 chip configuration found on the AAVA
+	  platform. Includes the extra initialisation and GPIO support
+	  neded for this device.
 
 config SERIAL_DZ
 	bool "DECstation DZ serial driver"
drivers/serial/Makefile +1 -0
index 4cd0c06..424067a 100644
@@ -47,6 +47,7 @@ obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
 obj-$(CONFIG_SERIAL_S5PV210) += s5pv210.o
 obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
 obj-$(CONFIG_SERIAL_MAX3107) += max3107.o
+obj-$(CONFIG_SERIAL_MAX3107_AAVA) += max3107-aava.o
 obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
 obj-$(CONFIG_SERIAL_MUX) += mux.o
 obj-$(CONFIG_SERIAL_68328) += 68328serial.o
drivers/serial/max3107-aava.c new file +344 -0

344 lines not on this page · raw message

drivers/serial/max3107.c +84 -329

602 lines not on this page · raw message

drivers/serial/max3107.h +83 -2

95 lines not on this page · raw message

include/linux/serial_core.h +4 -0
index 18f2fe0..38e62d9 100644
@@ -189,6 +189,10 @@
 /* SH-SCI */
 #define PORT_SCIFB	93
 
+/* MAX3107 */
+#define PORT_MAX3107	94
+
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>