MyungJoo Ham | de55d87 | 2012-04-20 14:16:22 +0900 | [diff] [blame] | 1 | What: /sys/class/extcon/.../ |
MyungJoo Ham | 806d9dd | 2012-04-20 14:16:25 +0900 | [diff] [blame^] | 2 | Date: February 2012 |
MyungJoo Ham | de55d87 | 2012-04-20 14:16:22 +0900 | [diff] [blame] | 3 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
| 4 | Description: |
| 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 Ham | 806d9dd | 2012-04-20 14:16:25 +0900 | [diff] [blame^] | 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 | |
MyungJoo Ham | de55d87 | 2012-04-20 14:16:22 +0900 | [diff] [blame] | 18 | What: /sys/class/extcon/.../name |
MyungJoo Ham | 806d9dd | 2012-04-20 14:16:25 +0900 | [diff] [blame^] | 19 | Date: February 2012 |
MyungJoo Ham | de55d87 | 2012-04-20 14:16:22 +0900 | [diff] [blame] | 20 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
| 21 | Description: |
| 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 | |
| 27 | What: /sys/class/extcon/.../state |
MyungJoo Ham | 806d9dd | 2012-04-20 14:16:25 +0900 | [diff] [blame^] | 28 | Date: February 2012 |
MyungJoo Ham | de55d87 | 2012-04-20 14:16:22 +0900 | [diff] [blame] | 29 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
| 30 | Description: |
MyungJoo Ham | 806d9dd | 2012-04-20 14:16:25 +0900 | [diff] [blame^] | 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 | |
| 61 | What: /sys/class/extcon/.../cable.x/name |
| 62 | Date: February 2012 |
| 63 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
| 64 | Description: |
| 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 | |
| 68 | What: /sys/class/extcon/.../cable.x/state |
| 69 | Date: February 2012 |
| 70 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
| 71 | Description: |
| 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). |