Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304040
b: refs/heads/master
c: 806d9dd
h: refs/heads/master
v: v3
  • Loading branch information
MyungJoo Ham authored and Greg Kroah-Hartman committed Apr 20, 2012
1 parent fc8bf62 commit f9891d6
Show file tree
Hide file tree
Showing 4 changed files with 668 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74c5d09bd562edc220d6e076b8f1e118819c178f
refs/heads/master: 806d9dd71ff52ef09764585baaeec23afbb98560
63 changes: 56 additions & 7 deletions trunk/Documentation/ABI/testing/sysfs-class-extcon
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
What: /sys/class/extcon/.../
Date: December 2011
Date: February 2012
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
Description:
Provide a place in sysfs for the extcon objects.
This allows accessing extcon specific variables.
The name of extcon object denoted as ... is the name given
with extcon_dev_register.

One extcon device denotes a single external connector
port. An external connector may have multiple cables
attached simultaneously. Many of docks, cradles, and
accessory cables have such capability. For example,
the 30-pin port of Nuri board (/arch/arm/mach-exynos)
may have both HDMI and Charger attached, or analog audio,
video, and USB cables attached simulteneously.

What: /sys/class/extcon/.../name
Date: December 2011
Date: February 2012
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
Description:
The /sys/class/extcon/.../name shows the name of the extcon
Expand All @@ -17,10 +25,51 @@ Description:
this sysfs node.

What: /sys/class/extcon/.../state
Date: December 2011
Date: February 2012
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
Description:
The /sys/class/extcon/.../state shows and stores the cable
attach/detach information of the corresponding extcon object.
If the extcon object has an optional callback "show_state"
defined, the showing function is overriden with the optional
callback.

If the default callback for showing function is used, the
format is like this:
# cat state
USB_OTG=1
HDMI=0
TA=1
EAR_JACK=0
#
In this example, the extcon device have USB_OTG and TA
cables attached and HDMI and EAR_JACK cables detached.

In order to update the state of an extcon device, enter a hex
state number starting with 0x.
echo 0xHEX > state

This updates the whole state of the extcon dev.
Inputs of all the methods are required to meet the
mutually_exclusive contidions if they exist.

It is recommended to use this "global" state interface if
you need to enter the value atomically. The later state
interface associated with each cable cannot update
multiple cable states of an extcon device simultaneously.

What: /sys/class/extcon/.../cable.x/name
Date: February 2012
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
Description:
The /sys/class/extcon/.../cable.x/name shows the name of cable
"x" (integer between 0 and 31) of an extcon device.

What: /sys/class/extcon/.../cable.x/state
Date: February 2012
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
Description:
The /sys/class/extcon/.../state shows the cable attach/detach
information of the corresponding extcon object. If the extcon
objecct has an optional callback "show_state" defined, the
callback will provide the name with this sysfs node.
The /sys/class/extcon/.../cable.x/name shows and stores the
state of cable "x" (integer between 0 and 31) of an extcon
device. The state value is either 0 (detached) or 1
(attached).
Loading

0 comments on commit f9891d6

Please sign in to comment.