public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3: cm-t35: enable ds2786 battery gas gauge
@ 2010-04-22  7:06 Mike Rapoport
  2010-04-22  7:32 ` Mike Rapoport
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Rapoport @ 2010-04-22  7:06 UTC (permalink / raw)
  To: linux-omap; +Cc: Yulia Vilensky, Mike Rapoport

From: Yulia Vilensky <vilensky@compulab.co.il>

This patch depends on ds2786 patch [1], but it does not break anything
even without the ds2786 battery support.

[1] http://lkml.org/lkml/2010/4/22/48

--
Signed-off-by: Yulia Vilensky <vilensky@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-omap2/board-cm-t35.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 2de4f79..c28e7bb 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -687,10 +687,23 @@ static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
 	},
 };
 
+#define DS2786_RSNS    18 /* Constant sense resistor value */
+
+static int cm_t35_ds2786_rsns_val = DS2786_RSNS;
+
+static struct i2c_board_info __initdata cm_t35_i2c3_boardinfo[] = {
+	{
+		I2C_BOARD_INFO("ds2786", 0x36),
+		.platform_data = &cm_t35_ds2786_rsns_val,
+	},
+};
+
 static void __init cm_t35_init_i2c(void)
 {
 	omap_register_i2c_bus(1, 2600, cm_t35_i2c_boardinfo,
 			      ARRAY_SIZE(cm_t35_i2c_boardinfo));
+	omap_register_i2c_bus(3, 400, cm_t35_i2c3_boardinfo,
+			      ARRAY_SIZE(cm_t35_i2c3_boardinfo));
 }
 
 static struct omap_board_config_kernel cm_t35_config[] __initdata = {
-- 
1.6.6.2


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

* Re: [PATCH] OMAP3: cm-t35: enable ds2786 battery gas gauge
  2010-04-22  7:06 [PATCH] OMAP3: cm-t35: enable ds2786 battery gas gauge Mike Rapoport
@ 2010-04-22  7:32 ` Mike Rapoport
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2010-04-22  7:32 UTC (permalink / raw)
  To: linux-omap; +Cc: Yulia Vilensky, Mike Rapoport

Please discard. Sorry for the noise.


Mike Rapoport wrote:
> From: Yulia Vilensky <vilensky@compulab.co.il>
> 
> This patch depends on ds2786 patch [1], but it does not break anything
> even without the ds2786 battery support.
> 
> [1] http://lkml.org/lkml/2010/4/22/48
> 
> --
> Signed-off-by: Yulia Vilensky <vilensky@compulab.co.il>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> ---
>  arch/arm/mach-omap2/board-cm-t35.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
> index 2de4f79..c28e7bb 100644
> --- a/arch/arm/mach-omap2/board-cm-t35.c
> +++ b/arch/arm/mach-omap2/board-cm-t35.c
> @@ -687,10 +687,23 @@ static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
>  	},
>  };
>  
> +#define DS2786_RSNS    18 /* Constant sense resistor value */
> +
> +static int cm_t35_ds2786_rsns_val = DS2786_RSNS;
> +
> +static struct i2c_board_info __initdata cm_t35_i2c3_boardinfo[] = {
> +	{
> +		I2C_BOARD_INFO("ds2786", 0x36),
> +		.platform_data = &cm_t35_ds2786_rsns_val,
> +	},
> +};
> +
>  static void __init cm_t35_init_i2c(void)
>  {
>  	omap_register_i2c_bus(1, 2600, cm_t35_i2c_boardinfo,
>  			      ARRAY_SIZE(cm_t35_i2c_boardinfo));
> +	omap_register_i2c_bus(3, 400, cm_t35_i2c3_boardinfo,
> +			      ARRAY_SIZE(cm_t35_i2c3_boardinfo));
>  }
>  
>  static struct omap_board_config_kernel cm_t35_config[] __initdata = {


-- 
Sincerely yours,
Mike.

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

end of thread, other threads:[~2010-04-22  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22  7:06 [PATCH] OMAP3: cm-t35: enable ds2786 battery gas gauge Mike Rapoport
2010-04-22  7:32 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox