Skip to content

Commit 3b6fd26

Browse files
committed
power: supply: generic-adc-battery: drop charge now support
Drop CHARGE_NOW support, which requires a platform specific calculation method. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
1 parent c8f573f commit 3b6fd26

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

drivers/power/supply/generic-adc-battery.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ static const enum power_supply_property gab_props[] = {
7272
POWER_SUPPLY_PROP_STATUS,
7373
POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
7474
POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN,
75-
POWER_SUPPLY_PROP_CHARGE_NOW,
7675
POWER_SUPPLY_PROP_VOLTAGE_NOW,
7776
POWER_SUPPLY_PROP_CURRENT_NOW,
7877
POWER_SUPPLY_PROP_TECHNOLOGY,
@@ -166,9 +165,6 @@ static int gab_get_property(struct power_supply *psy,
166165
case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
167166
val->intval = 0;
168167
break;
169-
case POWER_SUPPLY_PROP_CHARGE_NOW:
170-
val->intval = pdata->cal_charge(result);
171-
break;
172168
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
173169
case POWER_SUPPLY_PROP_CURRENT_NOW:
174170
case POWER_SUPPLY_PROP_POWER_NOW:

include/linux/power/generic-adc-battery.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
* struct gab_platform_data - platform_data for generic adc iio battery driver.
1111
* @battery_info: recommended structure to specify static power supply
1212
* parameters
13-
* @cal_charge: calculate charge level.
1413
*/
1514
struct gab_platform_data {
1615
struct power_supply_info battery_info;
17-
int (*cal_charge)(long value);
1816
};
1917

2018
#endif /* GENERIC_ADC_BATTERY_H */

0 commit comments

Comments
 (0)