diff options
author | Hyongbin Kim <hyongbink@nvidia.com> | 2013-10-15 13:33:16 +0900 |
---|---|---|
committer | Gabby Lee <galee@nvidia.com> | 2013-10-16 22:39:34 -0700 |
commit | 1d911020e42ab1a59233a71e167d6ca4082a91b2 (patch) | |
tree | c3262a4602eec67128ed087a8717b8831447cf20 | |
parent | fd6efe4c23d6a4554643b582c5afc695dc0665b2 (diff) |
ARM: Tegra: TT-power: set battery id check flag
Set battery id check flag of max17048 and add ADC pdata of Batt_ID channel.
Bug 1368059
Change-Id: I918a6e063fc01132931aaf84c9cb09deaaa16b6b
Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com>
Reviewed-on: http://git-master/r/299289
Reviewed-by: Gabby Lee <galee@nvidia.com>
Tested-by: Gabby Lee <galee@nvidia.com>
-rw-r--r-- | arch/arm/boot/dts/tegra114-tegratab-common.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-tegratab-power.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/tegra114-tegratab-common.dtsi b/arch/arm/boot/dts/tegra114-tegratab-common.dtsi index 223e7b2d5e74..6ac90534bba8 100644 --- a/arch/arm/boot/dts/tegra114-tegratab-common.dtsi +++ b/arch/arm/boot/dts/tegra114-tegratab-common.dtsi @@ -853,6 +853,7 @@ 0x70 0xC0 0x51 0x40 0x43 0xE0 0x43 0xC0 0x29 0xC0 0x2F 0xC0 0x17 0xE0 0x12 0xE0 0x1C 0x20 0x13 0x80 0x0E 0x00 0x0E 0x00>; + read_batt_id = <1>; set_current_threshold = "ina230"; current_normal = <4500>; /* 4.5A */ current_threshold_num = <2>; diff --git a/arch/arm/mach-tegra/board-tegratab-power.c b/arch/arm/mach-tegra/board-tegratab-power.c index af8d4afc0d82..8a3d6c12f9ca 100644 --- a/arch/arm/mach-tegra/board-tegratab-power.c +++ b/arch/arm/mach-tegra/board-tegratab-power.c @@ -123,6 +123,7 @@ struct max17048_battery_model tegratab_max17048_mdata = { struct max17048_platform_data tegratab_max17048_pdata = { .model_data = &tegratab_max17048_mdata, + .read_batt_id = 1; .set_current_threshold = ina230_set_current_threshold, .current_normal = TEGRATAB_BATTERY_MAX_CURRENT, .current_threshold_num = 2, @@ -414,12 +415,14 @@ static struct palmas_pmic_platform_data pmic_platform = { } static struct iio_map palmas_adc_iio_maps[] = { + PALMAS_GPADC_IIO_MAP("IN0", "0-0036", "batt_id"), PALMAS_GPADC_IIO_MAP("IN1", "generic-adc-thermal.0", "thermistor"), PALMAS_GPADC_IIO_MAP("IN3", "generic-adc-thermal.1", "tdiode"), PALMAS_GPADC_IIO_MAP(NULL, NULL, NULL), }; static struct palmas_gpadc_platform_data palmas_adc_pdata = { + .ch0_current_uA = 5, /* If ch3_dual_current is true, it will measure ch3 input signal with * ch3_current and the next current of ch3_current. * So this system will use 400uA and 800uA for ch3 measurement. */ |