diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/laptops/thinkpad-acpi.txt | 139 | ||||
-rw-r--r-- | Documentation/thermal/sysfs-api.txt | 33 |
2 files changed, 149 insertions, 23 deletions
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index 76cb428435da..01c6c3d8a7e3 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.19 | 3 | Version 0.20 |
4 | January 06th, 2008 | 4 | April 09th, 2008 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -18,6 +18,11 @@ This driver used to be named ibm-acpi until kernel 2.6.21 and release | |||
18 | moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel | 18 | moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel |
19 | 2.6.22, and release 0.14. | 19 | 2.6.22, and release 0.14. |
20 | 20 | ||
21 | The driver is named "thinkpad-acpi". In some places, like module | ||
22 | names, "thinkpad_acpi" is used because of userspace issues. | ||
23 | |||
24 | "tpacpi" is used as a shorthand where "thinkpad-acpi" would be too | ||
25 | long due to length limitations on some Linux kernel versions. | ||
21 | 26 | ||
22 | Status | 27 | Status |
23 | ------ | 28 | ------ |
@@ -571,6 +576,47 @@ netlink interface and the input layer interface, and don't bother at all | |||
571 | with hotkey_report_mode. | 576 | with hotkey_report_mode. |
572 | 577 | ||
573 | 578 | ||
579 | Brightness hotkey notes: | ||
580 | |||
581 | These are the current sane choices for brightness key mapping in | ||
582 | thinkpad-acpi: | ||
583 | |||
584 | For IBM and Lenovo models *without* ACPI backlight control (the ones on | ||
585 | which thinkpad-acpi will autoload its backlight interface by default, | ||
586 | and on which ACPI video does not export a backlight interface): | ||
587 | |||
588 | 1. Don't enable or map the brightness hotkeys in thinkpad-acpi, as | ||
589 | these older firmware versions unfortunately won't respect the hotkey | ||
590 | mask for brightness keys anyway, and always reacts to them. This | ||
591 | usually work fine, unless X.org drivers are doing something to block | ||
592 | the BIOS. In that case, use (3) below. This is the default mode of | ||
593 | operation. | ||
594 | |||
595 | 2. Enable the hotkeys, but map them to something else that is NOT | ||
596 | KEY_BRIGHTNESS_UP/DOWN or any other keycode that would cause | ||
597 | userspace to try to change the backlight level, and use that as an | ||
598 | on-screen-display hint. | ||
599 | |||
600 | 3. IF AND ONLY IF X.org drivers find a way to block the firmware from | ||
601 | automatically changing the brightness, enable the hotkeys and map | ||
602 | them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN, and feed that to | ||
603 | something that calls xbacklight. thinkpad-acpi will not be able to | ||
604 | change brightness in that case either, so you should disable its | ||
605 | backlight interface. | ||
606 | |||
607 | For Lenovo models *with* ACPI backlight control: | ||
608 | |||
609 | 1. Load up ACPI video and use that. ACPI video will report ACPI | ||
610 | events for brightness change keys. Do not mess with thinkpad-acpi | ||
611 | defaults in this case. thinkpad-acpi should not have anything to do | ||
612 | with backlight events in a scenario where ACPI video is loaded: | ||
613 | brightness hotkeys must be disabled, and the backlight interface is | ||
614 | to be kept disabled as well. This is the default mode of operation. | ||
615 | |||
616 | 2. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, | ||
617 | and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process | ||
618 | these keys on userspace somehow (e.g. by calling xbacklight). | ||
619 | |||
574 | Bluetooth | 620 | Bluetooth |
575 | --------- | 621 | --------- |
576 | 622 | ||
@@ -647,16 +693,31 @@ while others are still having problems. For more information: | |||
647 | 693 | ||
648 | https://bugs.freedesktop.org/show_bug.cgi?id=2000 | 694 | https://bugs.freedesktop.org/show_bug.cgi?id=2000 |
649 | 695 | ||
650 | ThinkLight control -- /proc/acpi/ibm/light | 696 | ThinkLight control |
651 | ------------------------------------------ | 697 | ------------------ |
698 | |||
699 | procfs: /proc/acpi/ibm/light | ||
700 | sysfs attributes: as per LED class, for the "tpacpi::thinklight" LED | ||
652 | 701 | ||
653 | The current status of the ThinkLight can be found in this file. A few | 702 | procfs notes: |
654 | models which do not make the status available will show it as | 703 | |
655 | "unknown". The available commands are: | 704 | The ThinkLight status can be read and set through the procfs interface. A |
705 | few models which do not make the status available will show the ThinkLight | ||
706 | status as "unknown". The available commands are: | ||
656 | 707 | ||
657 | echo on > /proc/acpi/ibm/light | 708 | echo on > /proc/acpi/ibm/light |
658 | echo off > /proc/acpi/ibm/light | 709 | echo off > /proc/acpi/ibm/light |
659 | 710 | ||
711 | sysfs notes: | ||
712 | |||
713 | The ThinkLight sysfs interface is documented by the LED class | ||
714 | documentation, in Documentation/leds-class.txt. The ThinkLight LED name | ||
715 | is "tpacpi::thinklight". | ||
716 | |||
717 | Due to limitations in the sysfs LED class, if the status of the thinklight | ||
718 | cannot be read or if it is unknown, thinkpad-acpi will report it as "off". | ||
719 | It is impossible to know if the status returned through sysfs is valid. | ||
720 | |||
660 | Docking / undocking -- /proc/acpi/ibm/dock | 721 | Docking / undocking -- /proc/acpi/ibm/dock |
661 | ------------------------------------------ | 722 | ------------------------------------------ |
662 | 723 | ||
@@ -815,28 +876,63 @@ The cmos command interface is prone to firmware split-brain problems, as | |||
815 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is | 876 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is |
816 | exported just as a debug tool. | 877 | exported just as a debug tool. |
817 | 878 | ||
818 | LED control -- /proc/acpi/ibm/led | 879 | LED control |
819 | --------------------------------- | 880 | ----------- |
881 | |||
882 | procfs: /proc/acpi/ibm/led | ||
883 | sysfs attributes: as per LED class, see below for names | ||
884 | |||
885 | Some of the LED indicators can be controlled through this feature. On | ||
886 | some older ThinkPad models, it is possible to query the status of the | ||
887 | LED indicators as well. Newer ThinkPads cannot query the real status | ||
888 | of the LED indicators. | ||
820 | 889 | ||
821 | Some of the LED indicators can be controlled through this feature. The | 890 | procfs notes: |
822 | available commands are: | 891 | |
892 | The available commands are: | ||
823 | 893 | ||
824 | echo '<led number> on' >/proc/acpi/ibm/led | 894 | echo '<LED number> on' >/proc/acpi/ibm/led |
825 | echo '<led number> off' >/proc/acpi/ibm/led | 895 | echo '<LED number> off' >/proc/acpi/ibm/led |
826 | echo '<led number> blink' >/proc/acpi/ibm/led | 896 | echo '<LED number> blink' >/proc/acpi/ibm/led |
827 | 897 | ||
828 | The <led number> range is 0 to 7. The set of LEDs that can be | 898 | The <LED number> range is 0 to 7. The set of LEDs that can be |
829 | controlled varies from model to model. Here is the mapping on the X40: | 899 | controlled varies from model to model. Here is the common ThinkPad |
900 | mapping: | ||
830 | 901 | ||
831 | 0 - power | 902 | 0 - power |
832 | 1 - battery (orange) | 903 | 1 - battery (orange) |
833 | 2 - battery (green) | 904 | 2 - battery (green) |
834 | 3 - UltraBase | 905 | 3 - UltraBase/dock |
835 | 4 - UltraBay | 906 | 4 - UltraBay |
907 | 5 - UltraBase battery slot | ||
908 | 6 - (unknown) | ||
836 | 7 - standby | 909 | 7 - standby |
837 | 910 | ||
838 | All of the above can be turned on and off and can be made to blink. | 911 | All of the above can be turned on and off and can be made to blink. |
839 | 912 | ||
913 | sysfs notes: | ||
914 | |||
915 | The ThinkPad LED sysfs interface is described in detail by the LED class | ||
916 | documentation, in Documentation/leds-class.txt. | ||
917 | |||
918 | The leds are named (in LED ID order, from 0 to 7): | ||
919 | "tpacpi::power", "tpacpi:orange:batt", "tpacpi:green:batt", | ||
920 | "tpacpi::dock_active", "tpacpi::bay_active", "tpacpi::dock_batt", | ||
921 | "tpacpi::unknown_led", "tpacpi::standby". | ||
922 | |||
923 | Due to limitations in the sysfs LED class, if the status of the LED | ||
924 | indicators cannot be read due to an error, thinkpad-acpi will report it as | ||
925 | a brightness of zero (same as LED off). | ||
926 | |||
927 | If the thinkpad firmware doesn't support reading the current status, | ||
928 | trying to read the current LED brightness will just return whatever | ||
929 | brightness was last written to that attribute. | ||
930 | |||
931 | These LEDs can blink using hardware acceleration. To request that a | ||
932 | ThinkPad indicator LED should blink in hardware accelerated mode, use the | ||
933 | "timer" trigger, and leave the delay_on and delay_off parameters set to | ||
934 | zero (to request hardware acceleration autodetection). | ||
935 | |||
840 | ACPI sounds -- /proc/acpi/ibm/beep | 936 | ACPI sounds -- /proc/acpi/ibm/beep |
841 | ---------------------------------- | 937 | ---------------------------------- |
842 | 938 | ||
@@ -1090,6 +1186,15 @@ it there will be the following attributes: | |||
1090 | dim the display. | 1186 | dim the display. |
1091 | 1187 | ||
1092 | 1188 | ||
1189 | WARNING: | ||
1190 | |||
1191 | Whatever you do, do NOT ever call thinkpad-acpi backlight-level change | ||
1192 | interface and the ACPI-based backlight level change interface | ||
1193 | (available on newer BIOSes, and driven by the Linux ACPI video driver) | ||
1194 | at the same time. The two will interact in bad ways, do funny things, | ||
1195 | and maybe reduce the life of the backlight lamps by needlessly kicking | ||
1196 | its level up and down at every change. | ||
1197 | |||
1093 | Volume control -- /proc/acpi/ibm/volume | 1198 | Volume control -- /proc/acpi/ibm/volume |
1094 | --------------------------------------- | 1199 | --------------------------------------- |
1095 | 1200 | ||
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index d9f28be75403..70d68ce8640a 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -108,10 +108,12 @@ and throttle appropriate devices. | |||
108 | RO read only value | 108 | RO read only value |
109 | RW read/write value | 109 | RW read/write value |
110 | 110 | ||
111 | All thermal sysfs attributes will be represented under /sys/class/thermal | 111 | Thermal sysfs attributes will be represented under /sys/class/thermal. |
112 | Hwmon sysfs I/F extension is also available under /sys/class/hwmon | ||
113 | if hwmon is compiled in or built as a module. | ||
112 | 114 | ||
113 | Thermal zone device sys I/F, created once it's registered: | 115 | Thermal zone device sys I/F, created once it's registered: |
114 | |thermal_zone[0-*]: | 116 | /sys/class/thermal/thermal_zone[0-*]: |
115 | |-----type: Type of the thermal zone | 117 | |-----type: Type of the thermal zone |
116 | |-----temp: Current temperature | 118 | |-----temp: Current temperature |
117 | |-----mode: Working mode of the thermal zone | 119 | |-----mode: Working mode of the thermal zone |
@@ -119,7 +121,7 @@ Thermal zone device sys I/F, created once it's registered: | |||
119 | |-----trip_point_[0-*]_type: Trip point type | 121 | |-----trip_point_[0-*]_type: Trip point type |
120 | 122 | ||
121 | Thermal cooling device sys I/F, created once it's registered: | 123 | Thermal cooling device sys I/F, created once it's registered: |
122 | |cooling_device[0-*]: | 124 | /sys/class/thermal/cooling_device[0-*]: |
123 | |-----type : Type of the cooling device(processor/fan/...) | 125 | |-----type : Type of the cooling device(processor/fan/...) |
124 | |-----max_state: Maximum cooling state of the cooling device | 126 | |-----max_state: Maximum cooling state of the cooling device |
125 | |-----cur_state: Current cooling state of the cooling device | 127 | |-----cur_state: Current cooling state of the cooling device |
@@ -130,10 +132,19 @@ They represent the relationship between a thermal zone and its associated coolin | |||
130 | They are created/removed for each | 132 | They are created/removed for each |
131 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution. | 133 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution. |
132 | 134 | ||
133 | |thermal_zone[0-*] | 135 | /sys/class/thermal/thermal_zone[0-*] |
134 | |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone | 136 | |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone |
135 | |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with | 137 | |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with |
136 | 138 | ||
139 | Besides the thermal zone device sysfs I/F and cooling device sysfs I/F, | ||
140 | the generic thermal driver also creates a hwmon sysfs I/F for each _type_ of | ||
141 | thermal zone device. E.g. the generic thermal driver registers one hwmon class device | ||
142 | and build the associated hwmon sysfs I/F for all the registered ACPI thermal zones. | ||
143 | /sys/class/hwmon/hwmon[0-*]: | ||
144 | |-----name: The type of the thermal zone devices. | ||
145 | |-----temp[1-*]_input: The current temperature of thermal zone [1-*]. | ||
146 | |-----temp[1-*]_critical: The critical trip point of thermal zone [1-*]. | ||
147 | Please read Documentation/hwmon/sysfs-interface for additional information. | ||
137 | 148 | ||
138 | *************************** | 149 | *************************** |
139 | * Thermal zone attributes * | 150 | * Thermal zone attributes * |
@@ -141,7 +152,10 @@ thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful e | |||
141 | 152 | ||
142 | type Strings which represent the thermal zone type. | 153 | type Strings which represent the thermal zone type. |
143 | This is given by thermal zone driver as part of registration. | 154 | This is given by thermal zone driver as part of registration. |
144 | Eg: "ACPI thermal zone" indicates it's a ACPI thermal device | 155 | Eg: "acpitz" indicates it's an ACPI thermal device. |
156 | In order to keep it consistent with hwmon sys attribute, | ||
157 | this should be a short, lowercase string, | ||
158 | not containing spaces nor dashes. | ||
145 | RO | 159 | RO |
146 | Required | 160 | Required |
147 | 161 | ||
@@ -218,7 +232,7 @@ the sys I/F structure will be built like this: | |||
218 | /sys/class/thermal: | 232 | /sys/class/thermal: |
219 | 233 | ||
220 | |thermal_zone1: | 234 | |thermal_zone1: |
221 | |-----type: ACPI thermal zone | 235 | |-----type: acpitz |
222 | |-----temp: 37000 | 236 | |-----temp: 37000 |
223 | |-----mode: kernel | 237 | |-----mode: kernel |
224 | |-----trip_point_0_temp: 100000 | 238 | |-----trip_point_0_temp: 100000 |
@@ -243,3 +257,10 @@ the sys I/F structure will be built like this: | |||
243 | |-----type: Fan | 257 | |-----type: Fan |
244 | |-----max_state: 2 | 258 | |-----max_state: 2 |
245 | |-----cur_state: 0 | 259 | |-----cur_state: 0 |
260 | |||
261 | /sys/class/hwmon: | ||
262 | |||
263 | |hwmon0: | ||
264 | |-----name: acpitz | ||
265 | |-----temp1_input: 37000 | ||
266 | |-----temp1_crit: 100000 | ||