1de55d871SMyungJoo HamWhat:		/sys/class/extcon/.../
2806d9dd7SMyungJoo HamDate:		February 2012
3de55d871SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
4de55d871SMyungJoo HamDescription:
5de55d871SMyungJoo Ham		Provide a place in sysfs for the extcon objects.
6de55d871SMyungJoo Ham		This allows accessing extcon specific variables.
7de55d871SMyungJoo Ham		The name of extcon object denoted as ... is the name given
8de55d871SMyungJoo Ham		with extcon_dev_register.
9de55d871SMyungJoo Ham
10806d9dd7SMyungJoo Ham		One extcon device denotes a single external connector
11806d9dd7SMyungJoo Ham		port. An external connector may have multiple cables
12806d9dd7SMyungJoo Ham		attached simultaneously. Many of docks, cradles, and
13806d9dd7SMyungJoo Ham		accessory cables have such capability. For example,
14806d9dd7SMyungJoo Ham		the 30-pin port of Nuri board (/arch/arm/mach-exynos)
15806d9dd7SMyungJoo Ham		may have both HDMI and Charger attached, or analog audio,
16806d9dd7SMyungJoo Ham		video, and USB cables attached simulteneously.
17806d9dd7SMyungJoo Ham
18*bde68e60SMyungJoo Ham		If there are cables mutually exclusive with each other,
19*bde68e60SMyungJoo Ham		such binary relations may be expressed with extcon_dev's
20*bde68e60SMyungJoo Ham		mutually_exclusive array.
21*bde68e60SMyungJoo Ham
22de55d871SMyungJoo HamWhat:		/sys/class/extcon/.../name
23806d9dd7SMyungJoo HamDate:		February 2012
24de55d871SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
25de55d871SMyungJoo HamDescription:
26de55d871SMyungJoo Ham		The /sys/class/extcon/.../name shows the name of the extcon
27de55d871SMyungJoo Ham		object. If the extcon object has an optional callback
28de55d871SMyungJoo Ham		"show_name" defined, the callback will provide the name with
29de55d871SMyungJoo Ham		this sysfs node.
30de55d871SMyungJoo Ham
31de55d871SMyungJoo HamWhat:		/sys/class/extcon/.../state
32806d9dd7SMyungJoo HamDate:		February 2012
33de55d871SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
34de55d871SMyungJoo HamDescription:
35806d9dd7SMyungJoo Ham		The /sys/class/extcon/.../state shows and stores the cable
36806d9dd7SMyungJoo Ham		attach/detach information of the corresponding extcon object.
37806d9dd7SMyungJoo Ham		If the extcon object has an optional callback "show_state"
38806d9dd7SMyungJoo Ham		defined, the showing function is overriden with the optional
39806d9dd7SMyungJoo Ham		callback.
40806d9dd7SMyungJoo Ham
41806d9dd7SMyungJoo Ham		If the default callback for showing function is used, the
42806d9dd7SMyungJoo Ham		format is like this:
43806d9dd7SMyungJoo Ham		# cat state
44806d9dd7SMyungJoo Ham		USB_OTG=1
45806d9dd7SMyungJoo Ham		HDMI=0
46806d9dd7SMyungJoo Ham		TA=1
47806d9dd7SMyungJoo Ham		EAR_JACK=0
48806d9dd7SMyungJoo Ham		#
49806d9dd7SMyungJoo Ham		In this example, the extcon device have USB_OTG and TA
50806d9dd7SMyungJoo Ham		cables attached and HDMI and EAR_JACK cables detached.
51806d9dd7SMyungJoo Ham
52806d9dd7SMyungJoo Ham		In order to update the state of an extcon device, enter a hex
53806d9dd7SMyungJoo Ham		state number starting with 0x.
54806d9dd7SMyungJoo Ham		 echo 0xHEX > state
55806d9dd7SMyungJoo Ham
56806d9dd7SMyungJoo Ham		This updates the whole state of the extcon dev.
57806d9dd7SMyungJoo Ham		Inputs of all the methods are required to meet the
58806d9dd7SMyungJoo Ham		mutually_exclusive contidions if they exist.
59806d9dd7SMyungJoo Ham
60806d9dd7SMyungJoo Ham		It is recommended to use this "global" state interface if
61806d9dd7SMyungJoo Ham		you need to enter the value atomically. The later state
62806d9dd7SMyungJoo Ham		interface associated with each cable cannot update
63806d9dd7SMyungJoo Ham		multiple cable states of an extcon device simultaneously.
64806d9dd7SMyungJoo Ham
65806d9dd7SMyungJoo HamWhat:		/sys/class/extcon/.../cable.x/name
66806d9dd7SMyungJoo HamDate:		February 2012
67806d9dd7SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
68806d9dd7SMyungJoo HamDescription:
69806d9dd7SMyungJoo Ham		The /sys/class/extcon/.../cable.x/name shows the name of cable
70806d9dd7SMyungJoo Ham		"x" (integer between 0 and 31) of an extcon device.
71806d9dd7SMyungJoo Ham
72806d9dd7SMyungJoo HamWhat:		/sys/class/extcon/.../cable.x/state
73806d9dd7SMyungJoo HamDate:		February 2012
74806d9dd7SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
75806d9dd7SMyungJoo HamDescription:
76806d9dd7SMyungJoo Ham		The /sys/class/extcon/.../cable.x/name shows and stores the
77806d9dd7SMyungJoo Ham		state of cable "x" (integer between 0 and 31) of an extcon
78806d9dd7SMyungJoo Ham		device. The state value is either 0 (detached) or 1
79806d9dd7SMyungJoo Ham		(attached).
80*bde68e60SMyungJoo Ham
81*bde68e60SMyungJoo HamWhat:		/sys/class/extcon/.../mutually_exclusive/...
82*bde68e60SMyungJoo HamDate:		December 2011
83*bde68e60SMyungJoo HamContact:	MyungJoo Ham <myungjoo.ham@samsung.com>
84*bde68e60SMyungJoo HamDescription:
85*bde68e60SMyungJoo Ham		Shows the relations of mutually exclusiveness. For example,
86*bde68e60SMyungJoo Ham		if the mutually_exclusive array of extcon_dev is
87*bde68e60SMyungJoo Ham		{0x3, 0x5, 0xC, 0x0}, the, the output is:
88*bde68e60SMyungJoo Ham		# ls mutually_exclusive/
89*bde68e60SMyungJoo Ham		0x3
90*bde68e60SMyungJoo Ham		0x5
91*bde68e60SMyungJoo Ham		0xc
92*bde68e60SMyungJoo Ham		#
93*bde68e60SMyungJoo Ham
94*bde68e60SMyungJoo Ham		Note that mutually_exclusive is a sub-directory of the extcon
95*bde68e60SMyungJoo Ham		device and the file names under the mutually_exclusive
96*bde68e60SMyungJoo Ham		directory show the mutually-exclusive sets, not the contents
97*bde68e60SMyungJoo Ham		of the files.
98