Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260515
b: refs/heads/master
c: f67df6c
h: refs/heads/master
i:
  260513: 1c270aa
  260511: 970125b
v: v3
  • Loading branch information
Shubhrajyoti Datta authored and Tony Lindgren committed Jul 5, 2011
1 parent eba4025 commit 96d2a4a
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6de8bae86c0459a881cead6735cd6971334cadd3
refs/heads/master: f67df6c670a8fcd3f63728afa2314e7eca653bd7
67 changes: 66 additions & 1 deletion trunk/arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,64 @@ static const int sdp4430_keymap[] = {
KEY(7, 6, KEY_OK),
KEY(7, 7, KEY_DOWN),
};
static struct omap_device_pad keypad_pads[] __initdata = {
{ .name = "kpd_col1.kpd_col1",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_col1.kpd_col1",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_col2.kpd_col2",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_col3.kpd_col3",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_col4.kpd_col4",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_col5.kpd_col5",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "gpmc_a23.kpd_col7",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "gpmc_a22.kpd_col6",
.enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
},
{ .name = "kpd_row0.kpd_row0",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "kpd_row1.kpd_row1",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "kpd_row2.kpd_row2",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "kpd_row3.kpd_row3",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "kpd_row4.kpd_row4",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "kpd_row5.kpd_row5",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "gpmc_a18.kpd_row6",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
{ .name = "gpmc_a19.kpd_row7",
.enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
OMAP_MUX_MODE1 | OMAP_INPUT_EN,
},
};

static struct matrix_keymap_data sdp4430_keymap_data = {
.keymap = sdp4430_keymap,
Expand All @@ -140,6 +198,13 @@ static struct omap4_keypad_platform_data sdp4430_keypad_data = {
.rows = 8,
.cols = 8,
};

static struct omap_board_data keypad_data = {
.id = 1,
.pads = keypad_pads,
.pads_cnt = ARRAY_SIZE(keypad_pads),
};

static struct gpio_led sdp4430_gpio_leds[] = {
{
.name = "omap4:green:debug0",
Expand Down Expand Up @@ -825,7 +890,7 @@ static void __init omap_4430sdp_init(void)
ARRAY_SIZE(sdp4430_spi_board_info));
}

status = omap4_keyboard_init(&sdp4430_keypad_data);
status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
if (status)
pr_err("Keypad initialization failed: %d\n", status);

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ struct omap_device_pm_latency omap_keyboard_latency[] = {
};

int __init omap4_keyboard_init(struct omap4_keypad_platform_data
*sdp4430_keypad_data)
*sdp4430_keypad_data, struct omap_board_data *bdata)
{
struct omap_device *od;
struct omap_hwmod *oh;
Expand All @@ -257,6 +257,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
name, oh->name);
return PTR_ERR(od);
}
oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);

return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/plat-omap/include/plat/omap4-keypad.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ struct omap4_keypad_platform_data {
u8 cols;
};

extern int omap4_keyboard_init(struct omap4_keypad_platform_data *);
extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
struct omap_board_data *);
#endif

0 comments on commit 96d2a4a

Please sign in to comment.