]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: power_supply: add missing defines present in the specification
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 15 Jul 2016 11:16:55 +0000 (12:16 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 15 Jul 2016 23:05:33 +0000 (08:05 +0900)
Some of the Greybus properties values (capacity level and scope) even
though they are defined in the specification were missing from the
protocol header.

They still match the kernel ones, but they should be present in there
for protocol sake.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h

index 18c527c4d4439a3aa895d3785505852e249e32de..21669093daf5cb19e4bbb91f6ec61756058d8778 100644 (file)
@@ -570,6 +570,19 @@ struct gb_bootrom_get_vid_pid_response {
 #define GB_POWER_SUPPLY_STATUS_NOT_CHARGING            0x0003
 #define GB_POWER_SUPPLY_STATUS_FULL                    0x0004
 
+/* Greybus power supply capacity level values */
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN         0x0000
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL                0x0001
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_LOW             0x0002
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL          0x0003
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_HIGH            0x0004
+#define GB_POWER_SUPPLY_CAPACITY_LEVEL_FULL            0x0005
+
+/* Greybus power supply scope values */
+#define GB_POWER_SUPPLY_SCOPE_UNKNOWN                  0x0000
+#define GB_POWER_SUPPLY_SCOPE_SYSTEM                   0x0001
+#define GB_POWER_SUPPLY_SCOPE_DEVICE                   0x0002
+
 struct gb_power_supply_get_supplies_response {
        __u8    supplies_count;
 } __packed;