mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
power: supply: max17042_battery: Add support for the STATUS property
Userspace prefers the driver having a status property over having to guess itself. Specifically this will properly make the GNOME3 UI (and likely others) properly show discharging / charging / full status, instead of always showing discharging as status. Note that in the case there is no charger driver supplying the max17042, then a status of unknown will get returned. At least upower treats this the same as not having a status attribute, so in this case nothing changes from a userspace pov. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
This commit is contained in:
parent
917362135b
commit
a9df22c00d
2 changed files with 49 additions and 0 deletions
|
@ -31,6 +31,9 @@
|
|||
#define MAX17042_DEFAULT_TEMP_MIN (0) /* For sys without temp sensor */
|
||||
#define MAX17042_DEFAULT_TEMP_MAX (700) /* 70 degrees Celcius */
|
||||
|
||||
/* Consider RepCap which is less then 10 units below FullCAP full */
|
||||
#define MAX17042_FULL_THRESHOLD 10
|
||||
|
||||
#define MAX17042_CHARACTERIZATION_DATA_SIZE 48
|
||||
|
||||
enum max17042_register {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue