From 6659b55dae09b2042d8cdd0f4576502c3e81957c Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Fri, 12 Feb 2016 13:56:59 +0100 Subject: 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 [tomeu: remove the mention to Type C from the comments] Signed-off-by: Tomeu Vizoso Reviewed-by: Alec Berg Reviewed-by: Vincent Palatin Reviewed-by: Todd Broch Signed-off-by: Sebastian Reichel --- drivers/power/power_supply_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/power/power_supply_sysfs.c') 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, char *buf) { static char *type_text[] = { "Unknown", "Battery", "UPS", "Mains", "USB", - "USB_DCP", "USB_CDP", "USB_ACA" + "USB_DCP", "USB_CDP", "USB_ACA", "USB_C", + "USB_PD", "USB_PD_DRP" }; static char *status_text[] = { "Unknown", "Charging", "Discharging", "Not charging", "Full" -- cgit v1.2.3-59-g8ed1b