1 What: Raise a uevent when a USB charger is inserted or removed
4 Contact: linux-usb@vger.kernel.org
5 Description: There are two USB charger states:
10 There are five USB charger types:
12 ======================== ==========================
13 USB_CHARGER_UNKNOWN_TYPE Charger type is unknown
14 USB_CHARGER_SDP_TYPE Standard Downstream Port
15 USB_CHARGER_CDP_TYPE Charging Downstream Port
16 USB_CHARGER_DCP_TYPE Dedicated Charging Port
17 USB_CHARGER_ACA_TYPE Accessory Charging Adapter
18 ======================== ==========================
20 https://www.usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement
22 Here are two examples taken using ``udevadm monitor -p`` when
23 USB charger is online::
25 UDEV change /devices/soc0/usbphynop1 (platform)
27 DEVPATH=/devices/soc0/usbphynop1
28 DRIVER=usb_phy_generic
29 MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv
30 OF_COMPATIBLE_0=usb-nop-xceiv
32 OF_FULLNAME=/usbphynop1
36 USB_CHARGER_STATE=USB_CHARGER_PRESENT
37 USB_CHARGER_TYPE=USB_CHARGER_SDP_TYPE
38 USEC_INITIALIZED=227422826
40 USB charger is offline::
42 KERNEL change /devices/soc0/usbphynop1 (platform)
44 DEVPATH=/devices/soc0/usbphynop1
45 DRIVER=usb_phy_generic
46 MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv
47 OF_COMPATIBLE_0=usb-nop-xceiv
49 OF_FULLNAME=/usbphynop1
53 USB_CHARGER_STATE=USB_CHARGER_ABSENT
54 USB_CHARGER_TYPE=USB_CHARGER_UNKNOWN_TYPE