diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2021-11-24 02:27:01 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-12-21 18:27:09 +0300 |
commit | 1b0b6cc8030d08d2a24e9e5f85dc36c5a58200ba (patch) | |
tree | f01bc3856cc1fef5b290efe81f1a18e8d1b29586 /include/linux/power_supply.h | |
parent | ee0d44f20dbdda535a63228165259ed9d40e7880 (diff) | |
download | linux-1b0b6cc8030d08d2a24e9e5f85dc36c5a58200ba.tar.xz |
power: supply: add charge_behaviour attributes
This a revised version of
"[RFC] add standardized attributes for force_discharge and inhibit_charge" [0],
incorporating discussion results.
The biggest change is the switch from two boolean attributes to a single
enum attribute.
[0] https://lore.kernel.org/platform-driver-x86/21569a89-8303-8573-05fb-c2fec29983d1@gmail.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20211123232704.25394-2-linux@weissschuh.net
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r-- | include/linux/power_supply.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 9ca1f120a211..70c333e86293 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -132,6 +132,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD, /* in percents! */ POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD, /* in percents! */ + POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR, POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT, POWER_SUPPLY_PROP_INPUT_POWER_LIMIT, @@ -202,6 +203,12 @@ enum power_supply_usb_type { POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */ }; +enum power_supply_charge_behaviour { + POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO = 0, + POWER_SUPPLY_CHARGE_BEHAVIOUR_INHIBIT_CHARGE, + POWER_SUPPLY_CHARGE_BEHAVIOUR_FORCE_DISCHARGE, +}; + enum power_supply_notifier_events { PSY_EVENT_PROP_CHANGED, }; |