arm: tegra: dalmore: add bq20z45 platform data
Syed Rafiuddin [Tue, 20 Nov 2012 10:51:32 +0000 (15:51 +0530)]
addition of platform data to bq20z45 fuel-gauge chipset

Change-Id: I1b49d9d418707b13c7231759358c0e9ddbc84e92
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/164992
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-dalmore-sensors.c

index 5158bf9..1b06ef0 100644 (file)
@@ -45,6 +45,7 @@
 #include <media/as364x.h>
 #include <media/ad5816.h>
 #include <generated/mach-types.h>
+#include <linux/power/sbs-battery.h>
 
 #include "gpio-names.h"
 #include "board.h"
@@ -306,6 +307,11 @@ static struct imx091_platform_data imx091_pdata = {
        .power_off              = dalmore_imx091_power_off,
 };
 
+struct sbs_platform_data sbs_pdata = {
+       .poll_retry_count = 100,
+       .i2c_retry_count = 2,
+};
+
 static int dalmore_ov9772_power_on(struct ov9772_power_rail *pw)
 {
        int err;
@@ -602,6 +608,7 @@ static int dalmore_nct1008_init(void)
 static struct i2c_board_info __initdata bq20z45_pdata[] = {
        {
                I2C_BOARD_INFO("sbs-battery", 0x0B),
+               .platform_data = &sbs_pdata,
        },
 };