From d6aa131160c8eb1c1f72d9c87c826015f1d66945 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Thu, 22 Mar 2007 11:14:52 +0200 Subject: [PATCH] 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. Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- drivers/input/keyboard/Kconfig | 6 ++++++ drivers/input/keyboard/Makefile | 1 + .../tsc2301-kp.c => input/keyboard/tsc2301_kp.c} | 0 drivers/input/touchscreen/Kconfig | 6 ++++++ drivers/input/touchscreen/Makefile | 1 + .../touchscreen/tsc2301_ts.c} | 0 drivers/spi/Kconfig | 14 -------------- drivers/spi/Makefile | 2 -- include/linux/spi/tsc2301.h | 6 +++--- 9 files changed, 17 insertions(+), 19 deletions(-) rename drivers/{spi/tsc2301-kp.c => input/keyboard/tsc2301_kp.c} (100%) rename drivers/{spi/tsc2301-ts.c => input/touchscreen/tsc2301_ts.c} (100%) diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 0088e1c5adc..6fefc4dfa92 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -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 diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index 17e5ce0bd6d..f80aebe1c9d 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile @@ -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 diff --git a/drivers/spi/tsc2301-kp.c b/drivers/input/keyboard/tsc2301_kp.c similarity index 100% rename from drivers/spi/tsc2301-kp.c rename to drivers/input/keyboard/tsc2301_kp.c diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 6b46c9bf1d2..caac4d425b7 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -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 diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 061bc14aeda..ee27e0b1e2d 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -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 diff --git a/drivers/spi/tsc2301-ts.c b/drivers/input/touchscreen/tsc2301_ts.c similarity index 100% rename from drivers/spi/tsc2301-ts.c rename to drivers/input/touchscreen/tsc2301_ts.c diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 47a9c6f735f..5b913c17068 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -196,20 +196,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 diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index aa5e0220fa2..5bfdfeef846 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -31,8 +31,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 ... diff --git a/include/linux/spi/tsc2301.h b/include/linux/spi/tsc2301.h index adf460e39be..059cc5811f1 100644 --- a/include/linux/spi/tsc2301.h +++ b/include/linux/spi/tsc2301.h @@ -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) -- 2.41.1