Samus: Punt on BQ_IBAT measurements for now

Nothing looks at this except for an EC console command, so leave it at unity
gain until we've confirmed that it's working correctly.

BUG=chrome-os-partner:28721
BRANCH=ToT
TEST=make buildall

Change-Id: I81085743535f4664ac8bf1d016bb7562046ab49b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/199243
Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
Bill Richardson
2014-05-09 17:48:38 -07:00
committed by chrome-internal-fetch
parent 3f94eba930
commit 18dcf0989e

View File

@@ -182,19 +182,23 @@ BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* ADC channels. Must be in the exactly same order as in enum adc_channel. */
const struct adc_t adc_channels[] = {
/* EC internal temperature is calculated by
/*
* EC internal temperature is calculated by
* 273 + (295 - 450 * ADC_VALUE / ADC_READ_MAX) / 2
* = -225 * ADC_VALUE / ADC_READ_MAX + 420.5
*/
{"ECTemp", LM4_ADC_SEQ0, -225, ADC_READ_MAX, 420,
LM4_AIN_NONE, 0x0e /* TS0 | IE0 | END0 */, 0, 0},
/* We're measuring the adapter input current through a 0.01-ohm
* resistor (ACP/ACN). IOUT is 40X the differential voltage, so
* 1000mA => 400mV. ADC returns 0x000-0xFFF over 0.0-3.3V.
* mA = 1000 * ADC_VALUE / ADC_READ_MAX * 3.3(V) * 100(R) / 40(gain)
/*
* The charger current is measured with a 0.005-ohm
* resistor. IBAT is 20X the voltage across that resistor when
* charging, and either 8X or 16X (default) when discharging, if it's
* even enabled (default is not). Nothing looks at this except the
* console command, so let's just leave it at unity gain. The ADC
* returns 0x000-0xFFF for 0.0-3.3V. You do the math.
*/
{"ChargerCurrent", LM4_ADC_SEQ1, 33000, ADC_READ_MAX * 4, 0,
{"ChargerCurrent", LM4_ADC_SEQ1, 1, 1, 0,
LM4_AIN(11), 0x06 /* IE0 | END0 */, LM4_GPIO_B, (1<<5)},
/*