diff options
Diffstat (limited to 'drivers/power/ds2760_battery.c')
-rw-r--r-- | drivers/power/ds2760_battery.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index e534290f3256..f2c9cc33c0f9 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -86,7 +86,11 @@ static int rated_capacities[] = { | |||
86 | 920, /* NEC */ | 86 | 920, /* NEC */ |
87 | 1440, /* Samsung */ | 87 | 1440, /* Samsung */ |
88 | 1440, /* BYD */ | 88 | 1440, /* BYD */ |
89 | #ifdef CONFIG_MACH_H4700 | ||
90 | 1800, /* HP iPAQ hx4700 3.7V 1800mAh (359113-001) */ | ||
91 | #else | ||
89 | 1440, /* Lishen */ | 92 | 1440, /* Lishen */ |
93 | #endif | ||
90 | 1440, /* NEC */ | 94 | 1440, /* NEC */ |
91 | 2880, /* Samsung */ | 95 | 2880, /* Samsung */ |
92 | 2880, /* BYD */ | 96 | 2880, /* BYD */ |
@@ -186,7 +190,7 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di) | |||
186 | 190 | ||
187 | scale[0] = di->full_active_uAh; | 191 | scale[0] = di->full_active_uAh; |
188 | for (i = 1; i < 5; i++) | 192 | for (i = 1; i < 5; i++) |
189 | scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 2 + i]; | 193 | scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 1 + i]; |
190 | 194 | ||
191 | di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10); | 195 | di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10); |
192 | di->full_active_uAh *= 1000; /* convert to µAh */ | 196 | di->full_active_uAh *= 1000; /* convert to µAh */ |