Skip to content

Commit 2ace298

Browse files
t-8chjannau
authored andcommitted
power: supply: macsmc_power: Report available charge_behaviours
The generic handling if charge_behaviours in the power_supply core requires power_supply_desc.charge_behaviours to be set. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
1 parent e6d285d commit 2ace298

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/power/supply/macsmc_power.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ static const struct power_supply_desc macsmc_battery_desc = {
514514
.property_is_writeable = macsmc_battery_property_is_writeable,
515515
.properties = macsmc_battery_props,
516516
.num_properties = ARRAY_SIZE(macsmc_battery_props),
517+
.charge_behaviours = BIT(POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO)
518+
| BIT(POWER_SUPPLY_CHARGE_BEHAVIOUR_FORCE_DISCHARGE)
519+
| BIT(POWER_SUPPLY_CHARGE_BEHAVIOUR_INHIBIT_CHARGE),
517520
};
518521

519522
static int macsmc_ac_get_property(struct power_supply *psy,

0 commit comments

Comments
 (0)