1What: /sys/class/extcon/.../ 2Date: February 2012 3Contact: MyungJoo Ham <[email protected]> 4Description: 5 Provide a place in sysfs for the extcon objects. 6 This allows accessing extcon specific variables. 7 The name of extcon object denoted as ... is the name given 8 with extcon_dev_register. 9 10 One extcon device denotes a single external connector 11 port. An external connector may have multiple cables 12 attached simultaneously. Many of docks, cradles, and 13 accessory cables have such capability. For example, 14 the 30-pin port of Nuri board (/arch/arm/mach-exynos) 15 may have both HDMI and Charger attached, or analog audio, 16 video, and USB cables attached simulteneously. 17 18What: /sys/class/extcon/.../name 19Date: February 2012 20Contact: MyungJoo Ham <[email protected]> 21Description: 22 The /sys/class/extcon/.../name shows the name of the extcon 23 object. If the extcon object has an optional callback 24 "show_name" defined, the callback will provide the name with 25 this sysfs node. 26 27What: /sys/class/extcon/.../state 28Date: February 2012 29Contact: MyungJoo Ham <[email protected]> 30Description: 31 The /sys/class/extcon/.../state shows and stores the cable 32 attach/detach information of the corresponding extcon object. 33 If the extcon object has an optional callback "show_state" 34 defined, the showing function is overriden with the optional 35 callback. 36 37 If the default callback for showing function is used, the 38 format is like this: 39 # cat state 40 USB_OTG=1 41 HDMI=0 42 TA=1 43 EAR_JACK=0 44 # 45 In this example, the extcon device have USB_OTG and TA 46 cables attached and HDMI and EAR_JACK cables detached. 47 48 In order to update the state of an extcon device, enter a hex 49 state number starting with 0x. 50 echo 0xHEX > state 51 52 This updates the whole state of the extcon dev. 53 Inputs of all the methods are required to meet the 54 mutually_exclusive contidions if they exist. 55 56 It is recommended to use this "global" state interface if 57 you need to enter the value atomically. The later state 58 interface associated with each cable cannot update 59 multiple cable states of an extcon device simultaneously. 60 61What: /sys/class/extcon/.../cable.x/name 62Date: February 2012 63Contact: MyungJoo Ham <[email protected]> 64Description: 65 The /sys/class/extcon/.../cable.x/name shows the name of cable 66 "x" (integer between 0 and 31) of an extcon device. 67 68What: /sys/class/extcon/.../cable.x/state 69Date: February 2012 70Contact: MyungJoo Ham <[email protected]> 71Description: 72 The /sys/class/extcon/.../cable.x/name shows and stores the 73 state of cable "x" (integer between 0 and 31) of an extcon 74 device. The state value is either 0 (detached) or 1 75 (attached). 76