extcon: Add new EXTCON_CHG_USB_PD type for USB Power Delivery
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 2 Jan 2017 04:03:03 +0000 (13:03 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 9 Jan 2017 01:04:58 +0000 (10:04 +0900)
This patch adds the new EXTCON_CHG_USB_PD for USB PD (Power Delivery)[1].
The USB Power Delivery specification specifies that USB cable provides
the increased power more than 7.5W to device with larger power demand.
The EXTCON_CHG_USB_PD has the EXTCON_TYPE_CHG and EXTCON_TYPE_USB type.

[1] https://en.wikipedia.org/wiki/USB#PD

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c
include/linux/extcon.h

index 591582b0d2b7e95d058ac4cc4cd91a6f19ffba38..768e36769870036282eaa3f23a0d046ffd57f08d 100644 (file)
@@ -99,6 +99,11 @@ struct __extcon_info {
                .id = EXTCON_CHG_WPT,
                .name = "WPT",
        },
+       [EXTCON_CHG_USB_PD] = {
+               .type = EXTCON_TYPE_CHG | EXTCON_TYPE_USB,
+               .id = EXTCON_CHG_USB_PD,
+               .name = "PD",
+       },
 
        /* Jack external connector */
        [EXTCON_JACK_MICROPHONE] = {
index 242157cad25d25810c283ddea0888b0f22be5ffe..7010fb01a81a342e20abd9ac917d5c3f7aa3de14 100644 (file)
@@ -65,6 +65,7 @@
 #define EXTCON_CHG_USB_FAST    9
 #define EXTCON_CHG_USB_SLOW    10
 #define EXTCON_CHG_WPT         11      /* Wireless Power Transfer */
+#define EXTCON_CHG_USB_PD      12      /* USB Power Delivery */
 
 /* Jack external connector */
 #define EXTCON_JACK_MICROPHONE 20