1 What: Raise a uevent when a USB char 1 What: Raise a uevent when a USB charger is inserted or removed 2 Date: 2020-01-14 2 Date: 2020-01-14 3 KernelVersion: 5.6 3 KernelVersion: 5.6 4 Contact: linux-usb@vger.kernel.org 4 Contact: linux-usb@vger.kernel.org 5 Description: There are two USB charger stat 5 Description: There are two USB charger states: 6 6 7 - USB_CHARGER_ABSENT 7 - USB_CHARGER_ABSENT 8 - USB_CHARGER_PRESENT 8 - USB_CHARGER_PRESENT 9 9 10 There are five USB charger typ 10 There are five USB charger types: 11 11 12 ======================== ==== 12 ======================== ========================== 13 USB_CHARGER_UNKNOWN_TYPE Char 13 USB_CHARGER_UNKNOWN_TYPE Charger type is unknown 14 USB_CHARGER_SDP_TYPE Stan 14 USB_CHARGER_SDP_TYPE Standard Downstream Port 15 USB_CHARGER_CDP_TYPE Char 15 USB_CHARGER_CDP_TYPE Charging Downstream Port 16 USB_CHARGER_DCP_TYPE Dedi 16 USB_CHARGER_DCP_TYPE Dedicated Charging Port 17 USB_CHARGER_ACA_TYPE Acce 17 USB_CHARGER_ACA_TYPE Accessory Charging Adapter 18 ======================== ==== 18 ======================== ========================== 19 19 20 https://www.usb.org/document-l 20 https://www.usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement 21 21 22 Here are two examples taken us 22 Here are two examples taken using ``udevadm monitor -p`` when 23 USB charger is online:: 23 USB charger is online:: 24 24 25 UDEV change /devices/so 25 UDEV change /devices/soc0/usbphynop1 (platform) 26 ACTION=change 26 ACTION=change 27 DEVPATH=/devices/soc0/usbp 27 DEVPATH=/devices/soc0/usbphynop1 28 DRIVER=usb_phy_generic 28 DRIVER=usb_phy_generic 29 MODALIAS=of:Nusbphynop1T(n 29 MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv 30 OF_COMPATIBLE_0=usb-nop-xc 30 OF_COMPATIBLE_0=usb-nop-xceiv 31 OF_COMPATIBLE_N=1 31 OF_COMPATIBLE_N=1 32 OF_FULLNAME=/usbphynop1 32 OF_FULLNAME=/usbphynop1 33 OF_NAME=usbphynop1 33 OF_NAME=usbphynop1 34 SEQNUM=2493 34 SEQNUM=2493 35 SUBSYSTEM=platform 35 SUBSYSTEM=platform 36 USB_CHARGER_STATE=USB_CHAR 36 USB_CHARGER_STATE=USB_CHARGER_PRESENT 37 USB_CHARGER_TYPE=USB_CHARG 37 USB_CHARGER_TYPE=USB_CHARGER_SDP_TYPE 38 USEC_INITIALIZED=227422826 38 USEC_INITIALIZED=227422826 39 39 40 USB charger is offline:: 40 USB charger is offline:: 41 41 42 KERNEL change /devices/s 42 KERNEL change /devices/soc0/usbphynop1 (platform) 43 ACTION=change 43 ACTION=change 44 DEVPATH=/devices/soc0/usbp 44 DEVPATH=/devices/soc0/usbphynop1 45 DRIVER=usb_phy_generic 45 DRIVER=usb_phy_generic 46 MODALIAS=of:Nusbphynop1T(n 46 MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv 47 OF_COMPATIBLE_0=usb-nop-xc 47 OF_COMPATIBLE_0=usb-nop-xceiv 48 OF_COMPATIBLE_N=1 48 OF_COMPATIBLE_N=1 49 OF_FULLNAME=/usbphynop1 49 OF_FULLNAME=/usbphynop1 50 OF_NAME=usbphynop1 50 OF_NAME=usbphynop1 51 SEQNUM=2494 51 SEQNUM=2494 52 SUBSYSTEM=platform 52 SUBSYSTEM=platform 53 USB_CHARGER_STATE=USB_CHAR 53 USB_CHARGER_STATE=USB_CHARGER_ABSENT 54 USB_CHARGER_TYPE=USB_CHARG 54 USB_CHARGER_TYPE=USB_CHARGER_UNKNOWN_TYPE
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.