* [PATCH] ARM: mx53_ard: Add support for the accelerometer
@ 2011-08-29 16:38 Daiane Angolini
2011-08-30 12:45 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Daiane Angolini @ 2011-08-29 16:38 UTC (permalink / raw)
To: linux-arm-kernel
mx53_ard has a MMA8451 accelerometer connected to i2c2.
Add support for it.
Signed-off-by: Daiane Angolini <daiane.angolini@freescale.com>
---
arch/arm/mach-mx5/board-mx53_ard.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
index ddc3015..b6dc812 100644
--- a/arch/arm/mach-mx5/board-mx53_ard.c
+++ b/arch/arm/mach-mx5/board-mx53_ard.c
@@ -161,6 +161,12 @@ static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = {
.wp_gpio = ARD_SD1_WP,
};
+static struct i2c_board_info mx53ard_i2c_devices[] = {
+ {
+ I2C_BOARD_INFO("mma8450", 0x1C),
+ },
+};
+
static struct imxi2c_platform_data mx53_ard_i2c2_data = {
.bitrate = 50000,
};
@@ -231,6 +237,8 @@ static void __init mx53_ard_board_init(void)
imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
imx53_add_imx2_wdt(0, NULL);
+ i2c_register_board_info(2, mx53ard_i2c_devices,
+ ARRAY_SIZE(mx53ard_i2c_devices));
imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
imx_add_gpio_keys(&ard_button_data);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: mx53_ard: Add support for the accelerometer
2011-08-29 16:38 [PATCH] ARM: mx53_ard: Add support for the accelerometer Daiane Angolini
@ 2011-08-30 12:45 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2011-08-30 12:45 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Mon, Aug 29, 2011 at 01:38:26PM -0300, Daiane Angolini wrote:
> mx53_ard has a MMA8451 accelerometer connected to i2c2.
>
> Add support for it.
>
> Signed-off-by: Daiane Angolini <daiane.angolini@freescale.com>
> ---
> arch/arm/mach-mx5/board-mx53_ard.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
> index ddc3015..b6dc812 100644
> --- a/arch/arm/mach-mx5/board-mx53_ard.c
> +++ b/arch/arm/mach-mx5/board-mx53_ard.c
> @@ -161,6 +161,12 @@ static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = {
> .wp_gpio = ARD_SD1_WP,
> };
>
> +static struct i2c_board_info mx53ard_i2c_devices[] = {
> + {
> + I2C_BOARD_INFO("mma8450", 0x1C),
> + },
> +};
Can you please name that mx53_ard_i2c2_devices? And I think it should be
possible to have it in .init.rodata (that is, mark it const and
__initconst).
Best regards
Uwe
> +
> static struct imxi2c_platform_data mx53_ard_i2c2_data = {
> .bitrate = 50000,
> };
> @@ -231,6 +237,8 @@ static void __init mx53_ard_board_init(void)
>
> imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
> imx53_add_imx2_wdt(0, NULL);
> + i2c_register_board_info(2, mx53ard_i2c_devices,
> + ARRAY_SIZE(mx53ard_i2c_devices));
> imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
> imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
> imx_add_gpio_keys(&ard_button_data);
> --
> 1.7.1
>
>
>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-30 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 16:38 [PATCH] ARM: mx53_ard: Add support for the accelerometer Daiane Angolini
2011-08-30 12:45 ` Uwe Kleine-König
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.