diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-10-08 02:27:59 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-08 02:27:59 -0400 |
commit | aca5e4aac88a0ee84e9dc63e3d4189adbaef24ca (patch) | |
tree | 29de3cde209b8351de33e5f4d175a30b258d5bfd /arch/blackfin/mach-bf548 | |
parent | a5ac0129249611fc4a35e6d7cd9b8462d67e5798 (diff) |
Blackfin arch: add BF54x / BF52x Rotary Input device driver platform resource to board file
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf548')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 397ddf6b8106..7c08b9f1838a 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -183,6 +183,37 @@ static struct platform_device bf54x_kpad_device = { | |||
183 | }; | 183 | }; |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) | ||
187 | #include <asm/bfin_rotary.h> | ||
188 | |||
189 | static struct bfin_rotary_platform_data bfin_rotary_data = { | ||
190 | /*.rotary_up_key = KEY_UP,*/ | ||
191 | /*.rotary_down_key = KEY_DOWN,*/ | ||
192 | .rotary_rel_code = REL_WHEEL, | ||
193 | .rotary_button_key = KEY_ENTER, | ||
194 | .debounce = 10, /* 0..17 */ | ||
195 | .mode = ROT_QUAD_ENC | ROT_DEBE, | ||
196 | }; | ||
197 | |||
198 | static struct resource bfin_rotary_resources[] = { | ||
199 | { | ||
200 | .start = IRQ_CNT, | ||
201 | .end = IRQ_CNT, | ||
202 | .flags = IORESOURCE_IRQ, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct platform_device bfin_rotary_device = { | ||
207 | .name = "bfin-rotary", | ||
208 | .id = -1, | ||
209 | .num_resources = ARRAY_SIZE(bfin_rotary_resources), | ||
210 | .resource = bfin_rotary_resources, | ||
211 | .dev = { | ||
212 | .platform_data = &bfin_rotary_data, | ||
213 | }, | ||
214 | }; | ||
215 | #endif | ||
216 | |||
186 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 217 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
187 | static struct platform_device rtc_device = { | 218 | static struct platform_device rtc_device = { |
188 | .name = "rtc-bfin", | 219 | .name = "rtc-bfin", |
@@ -817,6 +848,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
817 | &bf54x_kpad_device, | 848 | &bf54x_kpad_device, |
818 | #endif | 849 | #endif |
819 | 850 | ||
851 | #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) | ||
852 | &bfin_rotary_device, | ||
853 | #endif | ||
854 | |||
820 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 855 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
821 | &i2c_bfin_twi0_device, | 856 | &i2c_bfin_twi0_device, |
822 | #if !defined(CONFIG_BF542) | 857 | #if !defined(CONFIG_BF542) |