blob: 19b18e986a5778dee023a2e08378985a2457662b [file] [log] [blame]
MyungJoo Hamde55d872012-04-20 14:16:22 +09001What: /sys/class/extcon/.../
MyungJoo Ham806d9dd2012-04-20 14:16:25 +09002Date: February 2012
MyungJoo Hamde55d872012-04-20 14:16:22 +09003Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
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
MyungJoo Ham806d9dd2012-04-20 14:16:25 +090010 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
MyungJoo Hamde55d872012-04-20 14:16:22 +090018What: /sys/class/extcon/.../name
MyungJoo Ham806d9dd2012-04-20 14:16:25 +090019Date: February 2012
MyungJoo Hamde55d872012-04-20 14:16:22 +090020Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
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
MyungJoo Ham806d9dd2012-04-20 14:16:25 +090028Date: February 2012
MyungJoo Hamde55d872012-04-20 14:16:22 +090029Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
30Description:
MyungJoo Ham806d9dd2012-04-20 14:16:25 +090031 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 <myungjoo.ham@samsung.com>
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 <myungjoo.ham@samsung.com>
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).