linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ux500: Add Rohm BH1780GLI Light Sensor to i2c_board_info
@ 2011-01-11 13:10 Lee Jones
  2011-01-11 16:08 ` Rabin Vincent
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Jones @ 2011-01-11 13:10 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-kernel, Lee Jones

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 2635bb7..ff67408 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -134,6 +134,15 @@ static struct i2c_board_info mop500_i2c0_devices[] = {
 	},
 };
 
+static struct i2c_board_info mop500_i2c2_devices[] = {
+#if defined(CONFIG_SENSORS_BH1780)
+	{
+		/* Light sensor Rohm BH1780GLI */
+		I2C_BOARD_INFO("bh1780", 0x29),
+	},
+#endif
+};
+
 #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
 static struct nmk_i2c_controller u8500_i2c##id##_data = { \
 	/*				\
@@ -322,6 +331,8 @@ static void __init u8500_init_machine(void)
 
 	i2c_register_board_info(0, mop500_i2c0_devices,
 				ARRAY_SIZE(mop500_i2c0_devices));
+	i2c_register_board_info(2, mop500_i2c2_devices,
+				ARRAY_SIZE(mop500_i2c0_devices));
 }
 
 MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ux500: Add Rohm BH1780GLI Light Sensor to i2c_board_info
  2011-01-11 13:10 [PATCH] ux500: Add Rohm BH1780GLI Light Sensor to i2c_board_info Lee Jones
@ 2011-01-11 16:08 ` Rabin Vincent
  0 siblings, 0 replies; 2+ messages in thread
From: Rabin Vincent @ 2011-01-11 16:08 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel

On Tue, Jan 11, 2011 at 18:40, Lee Jones <lee.jones@linaro.org> wrote:
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  arch/arm/mach-ux500/board-mop500.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
> index 2635bb7..ff67408 100644
> --- a/arch/arm/mach-ux500/board-mop500.c
> +++ b/arch/arm/mach-ux500/board-mop500.c
> @@ -134,6 +134,15 @@ static struct i2c_board_info mop500_i2c0_devices[] = {
>        },
>  };
>
> +static struct i2c_board_info mop500_i2c2_devices[] = {
> +#if defined(CONFIG_SENSORS_BH1780)
> +       {
> +               /* Light sensor Rohm BH1780GLI */
> +               I2C_BOARD_INFO("bh1780", 0x29),
> +       },
> +#endif
> +};

You need to take care of the case where the driver is built as a module
(by adding a || defined(..._MODULE)).  It would actually be better if
you instead get rid of the ifdef entirely, since they get really ugly if
you add them for every device here.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-11 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 13:10 [PATCH] ux500: Add Rohm BH1780GLI Light Sensor to i2c_board_info Lee Jones
2011-01-11 16:08 ` Rabin Vincent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).