]> git.dujemihanovic.xyz Git - linux.git/commitdiff
power: supply: generic-adc-battery: drop charge now support
authorSebastian Reichel <sre@kernel.org>
Fri, 17 Mar 2023 22:56:59 +0000 (23:56 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 29 Mar 2023 20:38:56 +0000 (22:38 +0200)
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>
drivers/power/supply/generic-adc-battery.c
include/linux/power/generic-adc-battery.h

index e20894460d7fb5b0ab47c818effd25ae1487cd25..d07eeb7d46d3405270eeb5608841376b737e21ea 100644 (file)
@@ -72,7 +72,6 @@ static const enum power_supply_property gab_props[] = {
        POWER_SUPPLY_PROP_STATUS,
        POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
        POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN,
-       POWER_SUPPLY_PROP_CHARGE_NOW,
        POWER_SUPPLY_PROP_VOLTAGE_NOW,
        POWER_SUPPLY_PROP_CURRENT_NOW,
        POWER_SUPPLY_PROP_TECHNOLOGY,
@@ -166,9 +165,6 @@ static int gab_get_property(struct power_supply *psy,
        case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
                val->intval = 0;
                break;
-       case POWER_SUPPLY_PROP_CHARGE_NOW:
-               val->intval = pdata->cal_charge(result);
-               break;
        case POWER_SUPPLY_PROP_VOLTAGE_NOW:
        case POWER_SUPPLY_PROP_CURRENT_NOW:
        case POWER_SUPPLY_PROP_POWER_NOW:
index 50eb4bf28286b6672594feacd6b3560298676f2b..54434e4304d35956998b469bf509a59ac11a43e1 100644 (file)
  * struct gab_platform_data - platform_data for generic adc iio battery driver.
  * @battery_info:         recommended structure to specify static power supply
  *                        parameters
- * @cal_charge:           calculate charge level.
  */
 struct gab_platform_data {
        struct power_supply_info battery_info;
-       int     (*cal_charge)(long value);
 };
 
 #endif /* GENERIC_ADC_BATTERY_H */