Back to home page

OSCL-LXR

 
 

    


0001 What:           /sys/class/extcon/.../
0002 Date:           February 2012
0003 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0004 Description:
0005                 Provide a place in sysfs for the extcon objects.
0006                 This allows accessing extcon specific variables.
0007                 The name of extcon object denoted as ... is the name given
0008                 with extcon_dev_register.
0009 
0010                 One extcon device denotes a single external connector
0011                 port. An external connector may have multiple cables
0012                 attached simultaneously. Many of docks, cradles, and
0013                 accessory cables have such capability. For example,
0014                 the 30-pin port of Nuri board (/arch/arm/mach-exynos)
0015                 may have both HDMI and Charger attached, or analog audio,
0016                 video, and USB cables attached simultaneously.
0017 
0018                 If there are cables mutually exclusive with each other,
0019                 such binary relations may be expressed with extcon_dev's
0020                 mutually_exclusive array.
0021 
0022 What:           /sys/class/extcon/.../name
0023 Date:           February 2012
0024 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0025 Description:
0026                 The /sys/class/extcon/.../name shows the name of the extcon
0027                 object. If the extcon object has an optional callback
0028                 "show_name" defined, the callback will provide the name with
0029                 this sysfs node.
0030 
0031 What:           /sys/class/extcon/.../state
0032 Date:           February 2012
0033 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0034 Description:
0035                 The /sys/class/extcon/.../state shows and stores the cable
0036                 attach/detach information of the corresponding extcon object.
0037                 If the extcon object has an optional callback "show_state"
0038                 defined, the showing function is overridden with the optional
0039                 callback.
0040 
0041                 If the default callback for showing function is used, the
0042                 format is like this::
0043 
0044                     # cat state
0045                     USB_OTG=1
0046                     HDMI=0
0047                     TA=1
0048                     EAR_JACK=0
0049                     #
0050 
0051                 In this example, the extcon device has USB_OTG and TA
0052                 cables attached and HDMI and EAR_JACK cables detached.
0053 
0054                 In order to update the state of an extcon device, enter a hex
0055                 state number starting with 0x::
0056 
0057                     # echo 0xHEX > state
0058 
0059                 This updates the whole state of the extcon device.
0060                 Inputs of all the methods are required to meet the
0061                 mutually_exclusive conditions if they exist.
0062 
0063                 It is recommended to use this "global" state interface if
0064                 you need to set the value atomically. The later state
0065                 interface associated with each cable cannot update
0066                 multiple cable states of an extcon device simultaneously.
0067 
0068 What:           /sys/class/extcon/.../cable.X/name
0069 Date:           February 2012
0070 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0071 Description:
0072                 The /sys/class/extcon/.../cable.X/name shows the name of cable
0073                 "X" (integer between 0 and 31) of an extcon device.
0074 
0075 What:           /sys/class/extcon/.../cable.X/state
0076 Date:           February 2012
0077 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0078 Description:
0079                 The /sys/class/extcon/.../cable.X/state shows and stores the
0080                 state of cable "X" (integer between 0 and 31) of an extcon
0081                 device. The state value is either 0 (detached) or 1
0082                 (attached).
0083 
0084 What:           /sys/class/extcon/.../mutually_exclusive/...
0085 Date:           December 2011
0086 Contact:        MyungJoo Ham <myungjoo.ham@samsung.com>
0087 Description:
0088                 Shows the relations of mutually exclusiveness. For example,
0089                 if the mutually_exclusive array of extcon device is
0090                 {0x3, 0x5, 0xC, 0x0}, then the output is::
0091 
0092                     # ls mutually_exclusive/
0093                     0x3
0094                     0x5
0095                     0xc
0096                     #
0097 
0098                 Note that mutually_exclusive is a sub-directory of the extcon
0099                 device and the file names under the mutually_exclusive
0100                 directory show the mutually-exclusive sets, not the contents
0101                 of the files.