* [PATCH] OMAP4: Keyboard: Mux changes in the board file
@ 2011-06-23 12:15 Shubhrajyoti D
2011-07-01 7:48 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Shubhrajyoti D @ 2011-06-23 12:15 UTC (permalink / raw)
To: linux-omap; +Cc: Shubhrajyoti D
The mux settings for keypad are done for omap4430sdp in
board file.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 67 +++++++++++++++++++++++-
arch/arm/mach-omap2/devices.c | 3 +-
arch/arm/plat-omap/include/plat/omap4-keypad.h | 3 +-
3 files changed, 70 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d3..47e6ab9 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -125,6 +125,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,
@@ -136,6 +194,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",
@@ -752,7 +817,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);
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5b8ca68..1077ad6 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -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;
@@ -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;
}
diff --git a/arch/arm/plat-omap/include/plat/omap4-keypad.h b/arch/arm/plat-omap/include/plat/omap4-keypad.h
index 2b1d9bc..9fe6c87 100644
--- a/arch/arm/plat-omap/include/plat/omap4-keypad.h
+++ b/arch/arm/plat-omap/include/plat/omap4-keypad.h
@@ -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
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP4: Keyboard: Mux changes in the board file
2011-06-23 12:15 [PATCH] OMAP4: Keyboard: Mux changes in the board file Shubhrajyoti D
@ 2011-07-01 7:48 ` Tony Lindgren
2011-07-11 20:08 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2011-07-01 7:48 UTC (permalink / raw)
To: Shubhrajyoti D; +Cc: linux-omap
* Shubhrajyoti D <shubhrajyoti@ti.com> [110623 05:10]:
> The mux settings for keypad are done for omap4430sdp in
> board file.
Applying into devel-board branch.
> +static struct omap_board_data keypad_data = {
> + .id = 1,
> + .pads = keypad_pads,
> + .pads_cnt = ARRAY_SIZE(keypad_pads),
> +};
Aligned this struct better.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP4: Keyboard: Mux changes in the board file
2011-07-01 7:48 ` Tony Lindgren
@ 2011-07-11 20:08 ` Kevin Hilman
2011-07-12 6:33 ` Shubhrajyoti
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2011-07-11 20:08 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Shubhrajyoti D, linux-omap
On Fri, 2011-07-01 at 00:48 -0700, Tony Lindgren wrote:
> * Shubhrajyoti D <shubhrajyoti@ti.com> [110623 05:10]:
> > The mux settings for keypad are done for omap4430sdp in
> > board file.
>
> Applying into devel-board branch.
>
> > +static struct omap_board_data keypad_data = {
> > + .id = 1,
> > + .pads = keypad_pads,
> > + .pads_cnt = ARRAY_SIZE(keypad_pads),
> > +};
>
> Aligned this struct better.
This patch (and this struct) introduces another section mismatch warning
because it references another struct which is __initdata but the struct
itself is not:
WARNING: vmlinux.o(.data+0x37788): Section mismatch in reference from
the variable keypad_data to the (unknown reference) .init.data:(unknown)
The variable keypad_data references
the (unknown reference) __initdata (unknown)
A quick glance suggests the the right fix is that this struct should
also be __initdata:
diff --git a/arch/arm/mach-omap2/board-4430sdp.c
b/arch/arm/mach-omap2/board-4430sdp.c
index c7cef44..66758bf 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -199,7 +199,7 @@ static struct omap4_keypad_platform_data
sdp4430_keypad_data = {
.cols = 8,
};
-static struct omap_board_data keypad_data = {
+static struct omap_board_data keypad_data __initdata = {
.id = 1,
.pads = keypad_pads,
.pads_cnt = ARRAY_SIZE(keypad_pads),
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP4: Keyboard: Mux changes in the board file
2011-07-11 20:08 ` Kevin Hilman
@ 2011-07-12 6:33 ` Shubhrajyoti
0 siblings, 0 replies; 4+ messages in thread
From: Shubhrajyoti @ 2011-07-12 6:33 UTC (permalink / raw)
To: Kevin Hilman; +Cc: Tony Lindgren, linux-omap
On Tuesday 12 July 2011 01:38 AM, Kevin Hilman wrote:
> On Fri, 2011-07-01 at 00:48 -0700, Tony Lindgren wrote:
>> * Shubhrajyoti D<shubhrajyoti@ti.com> [110623 05:10]:
>>> The mux settings for keypad are done for omap4430sdp in
>>> board file.
>> Applying into devel-board branch.
>>
>>> +static struct omap_board_data keypad_data = {
>>> + .id = 1,
>>> + .pads = keypad_pads,
>>> + .pads_cnt = ARRAY_SIZE(keypad_pads),
>>> +};
>> Aligned this struct better.
> This patch (and this struct) introduces another section mismatch warning
> because it references another struct which is __initdata but the struct
> itself is not:
>
> WARNING: vmlinux.o(.data+0x37788): Section mismatch in reference from
> the variable keypad_data to the (unknown reference) .init.data:(unknown)
> The variable keypad_data references
> the (unknown reference) __initdata (unknown)
>
> A quick glance suggests the the right fix is that this struct should
> also be __initdata:
Yes , will incorporate the comments and send a patch.
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c
> b/arch/arm/mach-omap2/board-4430sdp.c
> index c7cef44..66758bf 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -199,7 +199,7 @@ static struct omap4_keypad_platform_data
> sdp4430_keypad_data = {
> .cols = 8,
> };
>
> -static struct omap_board_data keypad_data = {
> +static struct omap_board_data keypad_data __initdata = {
> .id = 1,
> .pads = keypad_pads,
> .pads_cnt = ARRAY_SIZE(keypad_pads),
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-12 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-23 12:15 [PATCH] OMAP4: Keyboard: Mux changes in the board file Shubhrajyoti D
2011-07-01 7:48 ` Tony Lindgren
2011-07-11 20:08 ` Kevin Hilman
2011-07-12 6:33 ` Shubhrajyoti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.