History

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.

Arnd Bergmann committed 7 years ago

Commit dfb6db01 parent 1b8c8133 files · +4 −7Browse files

Unified · Split

3 files
  1. drivers/input/keyboard/Kconfig +1 −1
  2. drivers/input/keyboard/ep93xx_keypad.c +1 −4
  3. include/linux/platform_data/keypad-ep93xx.h +2 −2
drivers/input/keyboard/Kconfig+1−1
@@ -194,7 +194,7 @@ config KEYBOARD_LKKBD · 193 unmodified lines
194194
195195 config KEYBOARD_EP93XX
196196 tristate "EP93xx Matrix Keypad support"
197− depends on ARCH_EP93XX
197+ depends on ARCH_EP93XX || COMPILE_TEST
198198 select INPUT_MATRIXKMAP
199199 help
200200 Say Y here to enable the matrix keypad on the Cirrus EP93XX.
drivers/input/keyboard/ep93xx_keypad.c+1−4
@@ -137,10 +137,7 @@ static void ep93xx_keypad_config(struct ep93xx_keypad *keypad) · 136 unmodified lines
137137 struct ep93xx_keypad_platform_data *pdata = keypad->pdata;
138138 unsigned int val = 0;
139139
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);
144141
145142 if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY)
146143 val |= KEY_INIT_DIS3KY;
include/linux/platform_data/keypad-ep93xx.h+2−2
@@ -9,8 +9,7 @@ struct matrix_keymap_data; · 8 unmodified lines
99 #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
1010 #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
1111 #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 */
1413
1514 /**
1615 * struct ep93xx_keypad_platform_data - platform specific device structure
@@ -24,6 +23,7 @@ struct ep93xx_keypad_platform_data { · 7 unmodified lines
2423 unsigned int debounce;
2524 unsigned int prescale;
2625 unsigned int flags;
26+ unsigned int clk_rate;
2727 };
2828
2929 #define EP93XX_MATRIX_ROWS (8)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t