Skip to contentSkip to conversation

SPI: Separate TSC2301 keypad and touchscreen modules under input subsystem

PATCH In review Jarkko Nikula 2 participants 2 messages Mar 22, 2007 – Mar 30, 2007

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

PATCH 2/4 SPI: Separate TSC2301 keypad and touchscreen modules under input subsystem

Patch moves TSC2301 keypad and touchscreen modules and Kconfig options into keyboard and touchscreen directories under drivers/input.

---
 drivers/input/keyboard/Kconfig         |    6 +
 drivers/input/keyboard/Makefile        |    1 +
 drivers/input/keyboard/tsc2301_kp.c    |  559 ++++++++++++++++++++++++++
 drivers/input/touchscreen/Kconfig      |    6 +
 drivers/input/touchscreen/Makefile     |    1 +
 drivers/input/touchscreen/tsc2301_ts.c |  683 ++++++++++++++++++++++++++++++++
 drivers/spi/Kconfig                    |   14 -
 drivers/spi/Makefile                   |    2 -
 drivers/spi/tsc2301-kp.c               |  559 --------------------------
 drivers/spi/tsc2301-ts.c               |  683 --------------------------------
 include/linux/spi/tsc2301.h            |    6 +-
 11 files changed, 1259 insertions(+), 1261 deletions(-)
drivers/input/keyboard/Kconfig +6 -0
index 0088e1c..6fefc4d 100644
@@ -239,4 +239,10 @@ config KEYBOARD_GPIO
 	  To compile this driver as a module, choose M here: the
 	  module will be called gpio-keys.
 
+config KEYBOARD_TSC2301
+	tristate "TSC2301 keypad support"
+	depends on SPI_TSC2301
+	help
+	  Say Y here for if you are using the keypad features of TSC2301.
+
 endif
drivers/input/keyboard/Makefile +1 -0
index 17e5ce0..f80aebe 100644
@@ -20,4 +20,5 @@ obj-$(CONFIG_KEYBOARD_OMAP)             += omap-keypad.o
 obj-$(CONFIG_OMAP_PS2)			+= innovator_ps2.o
 obj-$(CONFIG_KEYBOARD_AAED2000)         += aaed2000_kbd.o
 obj-$(CONFIG_KEYBOARD_GPIO)		+= gpio_keys.o
+obj-$(CONFIG_KEYBOARD_TSC2301)		+= tsc2301_kp.o
 
drivers/input/keyboard/tsc2301_kp.c new file +559 -0

559 lines not on this page · raw message

drivers/input/touchscreen/Kconfig +6 -0
index 6b46c9b..caac4d4 100644
@@ -159,4 +159,10 @@ config TOUCHSCREEN_UCB1400
 	  To compile this driver as a module, choose M here: the
 	  module will be called ucb1400_ts.
 
+config TOUCHSCREEN_TSC2301
+	tristate "TSC2301 touchscreen support"
+	depends on SPI_TSC2301
+	help
+	  Say Y here for if you are using the touchscreen features of TSC2301.
+
 endif
drivers/input/touchscreen/Makefile +1 -0
index 061bc14..ee27e0b 100644
@@ -18,3 +18,4 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN)	+= touchwin.o
 obj-$(CONFIG_TOUCHSCREEN_UCB1400)	+= ucb1400_ts.o
 obj-$(CONFIG_TOUCHSCREEN_TSC2102)	+= tsc2102_ts.o
 obj-$(CONFIG_TOUCHSCREEN_OMAP)	+= omap/
+obj-$(CONFIG_TOUCHSCREEN_TSC2301)	+= tsc2301_ts.o
drivers/input/touchscreen/tsc2301_ts.c new file +683 -0

683 lines not on this page · raw message

drivers/spi/Kconfig +0 -14
index c1874c6..9aebbd2 100644
@@ -188,20 +188,6 @@ config SPI_TSC2301
 	  To compile this driver as a module, choose M here: the
 	  module will be called tsc2301.
 
-config SPI_TSC2301_KEYPAD
-	boolean "TSC2301 keypad support"
-	depends on SPI_TSC2301
-	select INPUT_KEYBOARD
-	help
-	  Say Y here for if you are using the keypad features of TSC2301.
-
-config SPI_TSC2301_TOUCHSCREEN
-	boolean "TSC2301 touchscreen support"
-	depends on SPI_TSC2301
-	select INPUT_TOUCHSCREEN
-	help
-	  Say Y here for if you are using the touchscreen features of TSC2301.
-
 config SPI_TSC2301_AUDIO
 	boolean "TSC2301 audio support"
 	depends on SPI_TSC2301 && SND
drivers/spi/Makefile +0 -2
index 41bb1f2..286d88f 100644
@@ -30,8 +30,6 @@ obj-$(CONFIG_TSC2102)			+= tsc2102.o
 obj-$(CONFIG_SPI_AT25)		+= at25.o
 obj-$(CONFIG_SPI_TSC2301)		+= tsc2301.o
 tsc2301-objs					:= tsc2301-core.o
-tsc2301-$(CONFIG_SPI_TSC2301_TOUCHSCREEN)	+= tsc2301-ts.o
-tsc2301-$(CONFIG_SPI_TSC2301_KEYPAD)		+= tsc2301-kp.o
 tsc2301-$(CONFIG_SPI_TSC2301_AUDIO)		+= tsc2301-mixer.o
 # 	... add above this line ...
 
drivers/spi/tsc2301-kp.c deleted +0 -559

559 lines not on this page · raw message

drivers/spi/tsc2301-ts.c deleted +0 -683

683 lines not on this page · raw message

include/linux/spi/tsc2301.h +3 -3
index adf460e..059cc58 100644
@@ -174,15 +174,15 @@ static inline int  tsc2301_##module##_suspend(struct tsc2301 *tsc)	\
 }									\
 static inline void tsc2301_##module##_resume(struct tsc2301 *tsc) {}
 
-#ifdef CONFIG_SPI_TSC2301_KEYPAD
+#ifdef CONFIG_KEYBOARD_TSC2301
 TSC2301_DECL_MOD(kp)
 void tsc2301_kp_restart(struct tsc2301 *tsc);
 #else
 TSC2301_DECL_EMPTY_MOD(kp)
-void tsc2301_kp_restart(struct tsc2301 *tsc) {}
+static inline void tsc2301_kp_restart(struct tsc2301 *tsc) {}
 #endif
 
-#ifdef CONFIG_SPI_TSC2301_TOUCHSCREEN
+#ifdef CONFIG_TOUCHSCREEN_TSC2301
 TSC2301_DECL_MOD(ts)
 #else
 TSC2301_DECL_EMPTY_MOD(ts)
Signature · 1 line
1.4.4.4
#1 lore raw
Quoted 2 lines · Jarkko Nikula

Patch moves TSC2301 keypad and touchscreen modules and Kconfig options into keyboard and touchscreen directories under drivers/input.

Pushing today.

Tony