Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: ep93xx: keypad: stop using mach/platform.h

We can communicate the clock rate using platform data rather than setting
a flag to use a particular value in the driver, which is cleaner and
avoids the dependency.

No platform in the kernel currently defines the ep93xx keypad device
structure, so this is a rather pointless excercise. Any out of tree
users are probably dead now, but if not, they have to change their
platform code to match the new platform_data structure.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>

authored by

Arnd Bergmann and committed by
Olof Johansson
dfb6db00 1b8c8136

+4 -7
+1 -1
drivers/input/keyboard/Kconfig
··· 194 194 195 195 config KEYBOARD_EP93XX 196 196 tristate "EP93xx Matrix Keypad support" 197 - depends on ARCH_EP93XX 197 + depends on ARCH_EP93XX || COMPILE_TEST 198 198 select INPUT_MATRIXKMAP 199 199 help 200 200 Say Y here to enable the matrix keypad on the Cirrus EP93XX.
+1 -4
drivers/input/keyboard/ep93xx_keypad.c
··· 137 137 struct ep93xx_keypad_platform_data *pdata = keypad->pdata; 138 138 unsigned int val = 0; 139 139 140 - if (pdata->flags & EP93XX_KEYPAD_KDIV) 141 - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV4); 142 - else 143 - clk_set_rate(keypad->clk, EP93XX_KEYTCHCLK_DIV16); 140 + clk_set_rate(keypad->clk, pdata->clk_rate); 144 141 145 142 if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY) 146 143 val |= KEY_INIT_DIS3KY;
+2 -2
include/linux/platform_data/keypad-ep93xx.h
··· 9 9 #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ 10 10 #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ 11 11 #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ 12 - #define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ 13 - #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ 12 + #define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */ 14 13 15 14 /** 16 15 * struct ep93xx_keypad_platform_data - platform specific device structure ··· 23 24 unsigned int debounce; 24 25 unsigned int prescale; 25 26 unsigned int flags; 27 + unsigned int clk_rate; 26 28 }; 27 29 28 30 #define EP93XX_MATRIX_ROWS (8)