summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-04-14 20:32:51 +0200
committerSebastian Reichel <sre@kernel.org>2017-05-01 12:37:29 +0200
commita9df22c00d7c2c9c2944c62f1b819de6c214660f (patch)
tree8c81794bb217d09821e704bbb3566b09d228d291 /include
parentpower: supply: max17042_battery: Add default platform_data fallback data (diff)
downloadlinux-a9df22c00d7c2c9c2944c62f1b819de6c214660f.tar.xz
linux-a9df22c00d7c2c9c2944c62f1b819de6c214660f.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/max17042_battery.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 3489fb0f9099..a7ed29baf44a 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -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 {