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.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -9,8 +9,7 @@ struct matrix_keymap_data; · 8 unmodified lines | |||
| 9 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ | 9 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ |
| 10 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ | 10 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ |
| 11 | #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ | 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 */ | 12 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */ |
| 13 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ | ||
| 14 | 13 | ||
| 15 | /** | 14 | /** |
| 16 | * struct ep93xx_keypad_platform_data - platform specific device structure | 15 | * struct ep93xx_keypad_platform_data - platform specific device structure |
| @@ -24,6 +23,7 @@ struct ep93xx_keypad_platform_data { · 7 unmodified lines | |||
| 24 | unsigned int debounce; | 23 | unsigned int debounce; |
| 25 | unsigned int prescale; | 24 | unsigned int prescale; |
| 26 | unsigned int flags; | 25 | unsigned int flags; |
| 26 | unsigned int clk_rate; | ||
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | #define EP93XX_MATRIX_ROWS (8) | 29 | #define EP93XX_MATRIX_ROWS (8) |