aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-01-17 12:45:44 -0500
committerEric Miao <eric.miao@marvell.com>2009-01-21 02:06:37 -0500
commit51c10bbc3d7d700acd25a004d58a51067983acb6 (patch)
treeacc1b55793f560a8140cf96bc7d509c5bae43d92 /arch
parentfcb78d1f615a46509bffd9347b7f36fab4db79df (diff)
[ARM] pxa/magician: use named initializers for gpio_keys setup
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/magician.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index b952508d5f94..b7aafe6823f7 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -153,22 +153,31 @@ static struct pxaficp_platform_data magician_ficp_info = {
153 * GPIO Keys 153 * GPIO Keys
154 */ 154 */
155 155
156#define INIT_KEY(_code, _gpio, _desc) \
157 { \
158 .code = KEY_##_code, \
159 .gpio = _gpio, \
160 .desc = _desc, \
161 .type = EV_KEY, \
162 .wakeup = 1, \
163 }
164
156static struct gpio_keys_button magician_button_table[] = { 165static struct gpio_keys_button magician_button_table[] = {
157 {KEY_POWER, GPIO0_MAGICIAN_KEY_POWER, 0, "Power button"}, 166 INIT_KEY(POWER, GPIO0_MAGICIAN_KEY_POWER, "Power button"),
158 {KEY_ESC, GPIO37_MAGICIAN_KEY_HANGUP, 0, "Hangup button"}, 167 INIT_KEY(ESC, GPIO37_MAGICIAN_KEY_HANGUP, "Hangup button"),
159 {KEY_F10, GPIO38_MAGICIAN_KEY_CONTACTS, 0, "Contacts button"}, 168 INIT_KEY(F10, GPIO38_MAGICIAN_KEY_CONTACTS, "Contacts button"),
160 {KEY_CALENDAR, GPIO90_MAGICIAN_KEY_CALENDAR, 0, "Calendar button"}, 169 INIT_KEY(CALENDAR, GPIO90_MAGICIAN_KEY_CALENDAR, "Calendar button"),
161 {KEY_CAMERA, GPIO91_MAGICIAN_KEY_CAMERA, 0, "Camera button"}, 170 INIT_KEY(CAMERA, GPIO91_MAGICIAN_KEY_CAMERA, "Camera button"),
162 {KEY_UP, GPIO93_MAGICIAN_KEY_UP, 0, "Up button"}, 171 INIT_KEY(UP, GPIO93_MAGICIAN_KEY_UP, "Up button"),
163 {KEY_DOWN, GPIO94_MAGICIAN_KEY_DOWN, 0, "Down button"}, 172 INIT_KEY(DOWN, GPIO94_MAGICIAN_KEY_DOWN, "Down button"),
164 {KEY_LEFT, GPIO95_MAGICIAN_KEY_LEFT, 0, "Left button"}, 173 INIT_KEY(LEFT, GPIO95_MAGICIAN_KEY_LEFT, "Left button"),
165 {KEY_RIGHT, GPIO96_MAGICIAN_KEY_RIGHT, 0, "Right button"}, 174 INIT_KEY(RIGHT, GPIO96_MAGICIAN_KEY_RIGHT, "Right button"),
166 {KEY_KPENTER, GPIO97_MAGICIAN_KEY_ENTER, 0, "Action button"}, 175 INIT_KEY(KPENTER, GPIO97_MAGICIAN_KEY_ENTER, "Action button"),
167 {KEY_RECORD, GPIO98_MAGICIAN_KEY_RECORD, 0, "Record button"}, 176 INIT_KEY(RECORD, GPIO98_MAGICIAN_KEY_RECORD, "Record button"),
168 {KEY_VOLUMEUP, GPIO100_MAGICIAN_KEY_VOL_UP, 0, "Volume up"}, 177 INIT_KEY(VOLUMEUP, GPIO100_MAGICIAN_KEY_VOL_UP, "Volume up"),
169 {KEY_VOLUMEDOWN, GPIO101_MAGICIAN_KEY_VOL_DOWN, 0, "Volume down"}, 178 INIT_KEY(VOLUMEDOWN, GPIO101_MAGICIAN_KEY_VOL_DOWN, "Volume down"),
170 {KEY_PHONE, GPIO102_MAGICIAN_KEY_PHONE, 0, "Phone button"}, 179 INIT_KEY(PHONE, GPIO102_MAGICIAN_KEY_PHONE, "Phone button"),
171 {KEY_PLAY, GPIO99_MAGICIAN_HEADPHONE_IN, 0, "Headset button"}, 180 INIT_KEY(PLAY, GPIO99_MAGICIAN_HEADPHONE_IN, "Headset button"),
172}; 181};
173 182
174static struct gpio_keys_platform_data gpio_keys_data = { 183static struct gpio_keys_platform_data gpio_keys_data = {