summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf527/boards
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-10-08 10:27:59 +0400
committerBryan Wu <cooloney@kernel.org>2008-10-08 10:27:59 +0400
commitaca5e4aac88a0ee84e9dc63e3d4189adbaef24ca (patch)
tree29de3cde209b8351de33e5f4d175a30b258d5bfd /arch/blackfin/mach-bf527/boards
parenta5ac0129249611fc4a35e6d7cd9b8462d67e5798 (diff)
downloadlinux-aca5e4aac88a0ee84e9dc63e3d4189adbaef24ca.tar.xz
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-bf527/boards')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 04a8d6da9055..8ee2b744e234 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -853,6 +853,38 @@ static struct platform_device bfin_device_gpiokeys = {
};
#endif
+#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
+#include <linux/input.h>
+#include <asm/bfin_rotary.h>
+
+static struct bfin_rotary_platform_data bfin_rotary_data = {
+ /*.rotary_up_key = KEY_UP,*/
+ /*.rotary_down_key = KEY_DOWN,*/
+ .rotary_rel_code = REL_WHEEL,
+ .rotary_button_key = KEY_ENTER,
+ .debounce = 10, /* 0..17 */
+ .mode = ROT_QUAD_ENC | ROT_DEBE,
+};
+
+static struct resource bfin_rotary_resources[] = {
+ {
+ .start = IRQ_CNT,
+ .end = IRQ_CNT,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device bfin_rotary_device = {
+ .name = "bfin-rotary",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(bfin_rotary_resources),
+ .resource = bfin_rotary_resources,
+ .dev = {
+ .platform_data = &bfin_rotary_data,
+ },
+};
+#endif
+
static struct resource bfin_gpios_resources = {
.start = 0,
.end = MAX_BLACKFIN_GPIOS - 1,
@@ -969,6 +1001,10 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_device_gpiokeys,
#endif
+#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
+ &bfin_rotary_device,
+#endif
+
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
&ezkit_flash_device,
#endif