diff options
author | Syed Rafiuddin <srafiuddin@nvidia.com> | 2012-12-10 14:42:14 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-12-13 16:26:28 -0800 |
commit | 94a534b3269261bfe4d6060dbcefa0c2a4664f7a (patch) | |
tree | a04e239898ea6105050f112ffabe7dde92a77044 /arch/arm/mach-tegra/board-roth-power.c | |
parent | 1b64a0aae92258d7f4711b4adeed75aaa3ded300 (diff) |
Arm: tegra: roth: add max17048 battery data
Add battery characterization data for max17048
fuel-gauge driver.
Bug 1179923
Change-Id: I2d50b3c82f42c12e2fcb09c31557d0e2f2a2396d
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/170521
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-roth-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-roth-power.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-roth-power.c b/arch/arm/mach-tegra/board-roth-power.c index 3de1b29ddaab..d85c8d34a2a9 100644 --- a/arch/arm/mach-tegra/board-roth-power.c +++ b/arch/arm/mach-tegra/board-roth-power.c @@ -27,7 +27,7 @@ #include <linux/regulator/fixed.h> #include <linux/mfd/palmas.h> #include <linux/regulator/tps51632-regulator.h> -#include <linux/mfd/bq24192.h> +#include <linux/mfd/bq2419x.h> #include <linux/max17048_battery.h> #include <linux/gpio.h> #include <linux/regulator/userspace-consumer.h> @@ -124,6 +124,44 @@ struct bq2419x_charger_platform_data bq2419x_charger_pdata = { .update_status = max17048_battery_status, }; +struct max17048_battery_model max17048_mdata = { + .rcomp = 160, + .soccheck_A = 233, + .soccheck_B = 235, + .bits = 19, + .alert_threshold = 0x00, + .one_percent_alerts = 0x40, + .alert_on_reset = 0x40, + .rcomp_seg = 0x0800, + .hibernate = 0x3080, + .vreset = 0x9696, + .valert = 0xD4AA, + .ocvtest = 55824, + .data_tbl = { + 0x9F, 0x70, 0xA7, 0xD0, 0xAB, 0x10, 0xAE, 0x50, + 0xB0, 0x30, 0xB1, 0xD0, 0xB3, 0xC0, 0xB5, 0x80, + 0xB7, 0xB0, 0xBA, 0x80, 0xBE, 0x80, 0xC1, 0x30, + 0xC3, 0xD0, 0xC8, 0x70, 0xCC, 0x40, 0xD0, 0x10, + 0x09, 0x40, 0x0C, 0xA0, 0x0D, 0x80, 0x18, 0x40, + 0x1B, 0x20, 0x1F, 0x60, 0x1D, 0xE0, 0x13, 0xE0, + 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x12, 0x00, + 0x10, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, + }, +}; + +struct max17048_platform_data max17048_pdata = { + .use_ac = 0, + .use_usb = 0, + .model_data = &max17048_mdata, +}; + +static struct i2c_board_info __initdata max17048_boardinfo[] = { + { + I2C_BOARD_INFO("max17048", 0x36), + .platform_data = &max17048_pdata, + }, +}; + struct bq2419x_platform_data bq2419x_pdata = { .reg_pdata = &bq2419x_reg_pdata, .bcharger_pdata = &bq2419x_charger_pdata, @@ -669,6 +707,7 @@ int __init roth_regulator_init(void) roth_palmas_regulator_init(); i2c_register_board_info(4, tps51632_boardinfo, 1); + i2c_register_board_info(0, max17048_boardinfo, 1); i2c_register_board_info(0, bq2419x_boardinfo, 1); platform_device_register(&roth_pda_power_device); return 0; |