diff options
author | Sundar Iyer <sundar.iyer@stericsson.com> | 2010-12-03 10:05:38 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@stericsson.com> | 2010-12-19 14:54:55 -0500 |
commit | 556fb03869ad4d14e5336093a7a8565456a26c21 (patch) | |
tree | c101cd16bcf442a82d2b5246b0c5409cd1b55313 /arch | |
parent | e43abe6f98641e40460d74a002f09c7751db48f9 (diff) |
mach-ux500: add STMPE1601 platform data
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
[Minor fixups to GPIO enumerators]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-keypads.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | 13 |
3 files changed, 49 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-keypads.c b/arch/arm/mach-ux500/board-mop500-keypads.c index b634615b1381..8dbba03eb6c1 100644 --- a/arch/arm/mach-ux500/board-mop500-keypads.c +++ b/arch/arm/mach-ux500/board-mop500-keypads.c | |||
@@ -128,7 +128,39 @@ static struct ske_keypad_platform_data ske_keypad_board = { | |||
128 | .debounce_ms = 40, /* in millisecs */ | 128 | .debounce_ms = 40, /* in millisecs */ |
129 | }; | 129 | }; |
130 | 130 | ||
131 | /* | ||
132 | * STMPE1601 | ||
133 | */ | ||
134 | static struct stmpe_keypad_platform_data stmpe1601_keypad_data = { | ||
135 | .debounce_ms = 64, | ||
136 | .scan_count = 8, | ||
137 | .no_autorepeat = true, | ||
138 | .keymap_data = &mop500_keymap_data, | ||
139 | }; | ||
140 | |||
141 | static struct stmpe_platform_data stmpe1601_data = { | ||
142 | .id = 1, | ||
143 | .blocks = STMPE_BLOCK_KEYPAD, | ||
144 | .irq_trigger = IRQF_TRIGGER_FALLING, | ||
145 | .irq_base = MOP500_STMPE1601_IRQ(0), | ||
146 | .keypad = &stmpe1601_keypad_data, | ||
147 | .autosleep = true, | ||
148 | .autosleep_timeout = 1024, | ||
149 | }; | ||
150 | |||
151 | static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = { | ||
152 | { | ||
153 | I2C_BOARD_INFO("stmpe1601", 0x40), | ||
154 | .irq = NOMADIK_GPIO_TO_IRQ(218), | ||
155 | .platform_data = &stmpe1601_data, | ||
156 | .flags = I2C_CLIENT_WAKE, | ||
157 | }, | ||
158 | }; | ||
159 | |||
131 | void mop500_keypad_init(void) | 160 | void mop500_keypad_init(void) |
132 | { | 161 | { |
133 | db8500_add_ske_keypad(&ske_keypad_board); | 162 | db8500_add_ske_keypad(&ske_keypad_board); |
163 | |||
164 | i2c_register_board_info(0, mop500_i2c0_devices_stuib, | ||
165 | ARRAY_SIZE(mop500_i2c0_devices_stuib)); | ||
134 | } | 166 | } |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 0bc0aa311de1..a1c9ea1a66df 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -71,7 +71,11 @@ static pin_cfg_t mop500_pins[] = { | |||
71 | GPIO167_KP_O1, | 71 | GPIO167_KP_O1, |
72 | GPIO168_KP_O0, | 72 | GPIO168_KP_O0, |
73 | 73 | ||
74 | GPIO217_GPIO, /* GPIO_EXP_INT */ | 74 | /* GPIO_EXP_INT */ |
75 | GPIO217_GPIO, | ||
76 | |||
77 | /* STMPE1601 IRQ */ | ||
78 | GPIO218_GPIO | PIN_INPUT_PULLUP, | ||
75 | }; | 79 | }; |
76 | 80 | ||
77 | static struct ab8500_platform_data ab8500_platdata = { | 81 | static struct ab8500_platform_data ab8500_platdata = { |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h index 4a91bbdb973e..7cdeb2af0ebb 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ | 15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ |
16 | + AB8500_NR_IRQS) | 16 | + AB8500_NR_IRQS) |
17 | 17 | ||
18 | /* TC35892 */ | ||
18 | #define TC35892_NR_INTERNAL_IRQS 8 | 19 | #define TC35892_NR_INTERNAL_IRQS 8 |
19 | #define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x)) | 20 | #define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x)) |
20 | #define TC35892_NR_GPIOS 24 | 21 | #define TC35892_NR_GPIOS 24 |
@@ -25,8 +26,18 @@ | |||
25 | #define MOP500_EGPIO_IRQ_BASE MOP500_AB8500_IRQ_END | 26 | #define MOP500_EGPIO_IRQ_BASE MOP500_AB8500_IRQ_END |
26 | #define MOP500_EGPIO_IRQ_END (MOP500_EGPIO_IRQ_BASE \ | 27 | #define MOP500_EGPIO_IRQ_END (MOP500_EGPIO_IRQ_BASE \ |
27 | + MOP500_EGPIO_NR_IRQS) | 28 | + MOP500_EGPIO_NR_IRQS) |
29 | /* STMPE1601 irqs */ | ||
30 | #define STMPE_NR_INTERNAL_IRQS 9 | ||
31 | #define STMPE_INT_GPIO(x) (STMPE_NR_INTERNAL_IRQS + (x)) | ||
32 | #define STMPE_NR_GPIOS 24 | ||
33 | #define STMPE_NR_IRQS STMPE_INT_GPIO(STMPE_NR_GPIOS) | ||
28 | 34 | ||
29 | #define MOP500_IRQ_END MOP500_EGPIO_IRQ_END | 35 | #define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END |
36 | #define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x)) | ||
37 | |||
38 | #define MOP500_NR_IRQS MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS) | ||
39 | |||
40 | #define MOP500_IRQ_END MOP500_NR_IRQS | ||
30 | 41 | ||
31 | #if MOP500_IRQ_END > IRQ_BOARD_END | 42 | #if MOP500_IRQ_END > IRQ_BOARD_END |
32 | #undef IRQ_BOARD_END | 43 | #undef IRQ_BOARD_END |