summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2016-07-15 12:16:55 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-16 08:05:33 +0900
commit7a0d4eae83e7dbabd02c744ec3aa0ed542ed6181 (patch)
tree193948f8e32ac328055af1025c1869e7b4415903 /drivers/staging
parentc10b4ea3b23fdd1d7db531b316ba75fd2578fc2a (diff)
downloadlinux-7a0d4eae83e7dbabd02c744ec3aa0ed542ed6181.tar.bz2
greybus: power_supply: add missing defines present in the specification
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/greybus_protocols.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 18c527c4d443..21669093daf5 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -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;