diff options
author | Benson Leung <bleung@chromium.org> | 2016-02-12 07:56:59 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-02-15 01:02:32 -0500 |
commit | 6659b55dae09b2042d8cdd0f4576502c3e81957c (patch) | |
tree | 9055b8e604590b3545402c7c2a30e74977cd9ed1 /drivers/power/power_supply_sysfs.c | |
parent | 64024ac7bb82c41265e7ba08235591d9a2709dfc (diff) |
power_supply: Add types for USB Type C and PD chargers
This adds power supply types for USB chargers defined in
the USB Type-C Specification 1.1 and in the
USB Power Delivery Specification Revision 2.0 V1.1.
The following are added :
POWER_SUPPLY_TYPE_USB_TYPE_C, /* Type C Port */
POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery Port */
POWER_SUPPLY_TYPE_USB_PD_DRP, /* PD Dual Role Port */
Signed-off-by: Benson Leung <bleung@chromium.org>
[tomeu: remove the mention to Type C from the comments]
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/power_supply_sysfs.c')
-rw-r--r-- | drivers/power/power_supply_sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index ed2d7fd0c734..80fed98832f9 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -45,7 +45,8 @@ static ssize_t power_supply_show_property(struct device *dev, | |||
45 | char *buf) { | 45 | char *buf) { |
46 | static char *type_text[] = { | 46 | static char *type_text[] = { |
47 | "Unknown", "Battery", "UPS", "Mains", "USB", | 47 | "Unknown", "Battery", "UPS", "Mains", "USB", |
48 | "USB_DCP", "USB_CDP", "USB_ACA" | 48 | "USB_DCP", "USB_CDP", "USB_ACA", "USB_C", |
49 | "USB_PD", "USB_PD_DRP" | ||
49 | }; | 50 | }; |
50 | static char *status_text[] = { | 51 | static char *status_text[] = { |
51 | "Unknown", "Charging", "Discharging", "Not charging", "Full" | 52 | "Unknown", "Charging", "Discharging", "Not charging", "Full" |