diff options
author | Carlos Corbacho <carlos@strangeworlds.co.uk> | 2008-02-08 20:32:14 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-09 04:15:40 -0500 |
commit | f04b7c402ba587a299e62907a457013914dec477 (patch) | |
tree | 3743f4b5cdb3d4d6a8adac85305dc5e0d36c3c4f /Documentation/laptops | |
parent | f191dc6b55cf92eb8e1f48b41533ecf4d6161569 (diff) |
sony-laptop - Move sony-laptop.txt to Documentation/laptops
Also update references to sony-laptop.txt in Kconfig.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
CC: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'Documentation/laptops')
-rw-r--r-- | Documentation/laptops/00-INDEX | 2 | ||||
-rw-r--r-- | Documentation/laptops/sony-laptop.txt | 116 |
2 files changed, 118 insertions, 0 deletions
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX index e806b084e5b2..c5bac77d3576 100644 --- a/Documentation/laptops/00-INDEX +++ b/Documentation/laptops/00-INDEX | |||
@@ -1,4 +1,6 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - This file | 2 | - This file |
3 | sony-laptop.txt | ||
4 | - Sony Notebook Control Driver (SNC) Readme. | ||
3 | thinkpad-acpi.txt | 5 | thinkpad-acpi.txt |
4 | - information on the (IBM and Lenovo) ThinkPad ACPI Extras driver. | 6 | - information on the (IBM and Lenovo) ThinkPad ACPI Extras driver. |
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt new file mode 100644 index 000000000000..8b2bc1572d98 --- /dev/null +++ b/Documentation/laptops/sony-laptop.txt | |||
@@ -0,0 +1,116 @@ | |||
1 | Sony Notebook Control Driver (SNC) Readme | ||
2 | ----------------------------------------- | ||
3 | Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net> | ||
4 | Copyright (C) 2007 Mattia Dongili <malattia@linux.it> | ||
5 | |||
6 | This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the | ||
7 | Sony Vaio laptops. This driver mixes both devices functions under the same | ||
8 | (hopefully consistent) interface. This also means that the sonypi driver is | ||
9 | obsoleted by sony-laptop now. | ||
10 | |||
11 | Fn keys (hotkeys): | ||
12 | ------------------ | ||
13 | Some models report hotkeys through the SNC or SPIC devices, such events are | ||
14 | reported both through the ACPI subsystem as acpi events and through the INPUT | ||
15 | subsystem. See the logs of acpid or /proc/acpi/event and | ||
16 | /proc/bus/input/devices to find out what those events are and which input | ||
17 | devices are created by the driver. | ||
18 | |||
19 | Backlight control: | ||
20 | ------------------ | ||
21 | If your laptop model supports it, you will find sysfs files in the | ||
22 | /sys/class/backlight/sony/ | ||
23 | directory. You will be able to query and set the current screen | ||
24 | brightness: | ||
25 | brightness get/set screen brightness (an iteger | ||
26 | between 0 and 7) | ||
27 | actual_brightness reading from this file will query the HW | ||
28 | to get real brightness value | ||
29 | max_brightness the maximum brightness value | ||
30 | |||
31 | |||
32 | Platform specific: | ||
33 | ------------------ | ||
34 | Loading the sony-laptop module will create a | ||
35 | /sys/devices/platform/sony-laptop/ | ||
36 | directory populated with some files. | ||
37 | |||
38 | You then read/write integer values from/to those files by using | ||
39 | standard UNIX tools. | ||
40 | |||
41 | The files are: | ||
42 | brightness_default screen brightness which will be set | ||
43 | when the laptop will be rebooted | ||
44 | cdpower power on/off the internal CD drive | ||
45 | audiopower power on/off the internal sound card | ||
46 | lanpower power on/off the internal ethernet card | ||
47 | (only in debug mode) | ||
48 | bluetoothpower power on/off the internal bluetooth device | ||
49 | fanspeed get/set the fan speed | ||
50 | |||
51 | Note that some files may be missing if they are not supported | ||
52 | by your particular laptop model. | ||
53 | |||
54 | Example usage: | ||
55 | # echo "1" > /sys/devices/platform/sony-laptop/brightness_default | ||
56 | sets the lowest screen brightness for the next and later reboots, | ||
57 | # echo "8" > /sys/devices/platform/sony-laptop/brightness_default | ||
58 | sets the highest screen brightness for the next and later reboots, | ||
59 | # cat /sys/devices/platform/sony-laptop/brightness_default | ||
60 | retrieves the value. | ||
61 | |||
62 | # echo "0" > /sys/devices/platform/sony-laptop/audiopower | ||
63 | powers off the sound card, | ||
64 | # echo "1" > /sys/devices/platform/sony-laptop/audiopower | ||
65 | powers on the sound card. | ||
66 | |||
67 | Development: | ||
68 | ------------ | ||
69 | |||
70 | If you want to help with the development of this driver (and | ||
71 | you are not afraid of any side effects doing strange things with | ||
72 | your ACPI BIOS could have on your laptop), load the driver and | ||
73 | pass the option 'debug=1'. | ||
74 | |||
75 | REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS. | ||
76 | |||
77 | In your kernel logs you will find the list of all ACPI methods | ||
78 | the SNC device has on your laptop. You can see the GCDP/GCDP methods | ||
79 | used to pwer on/off the CD drive, but there are others. | ||
80 | |||
81 | I HAVE NO IDEA WHAT THOSE METHODS DO. | ||
82 | |||
83 | The sony-laptop driver creates, for some of those methods (the most | ||
84 | current ones found on several Vaio models), an entry under | ||
85 | /sys/devices/platform/sony-laptop, just like the 'cdpower' one. | ||
86 | You can create other entries corresponding to your own laptop methods by | ||
87 | further editing the source (see the 'sony_nc_values' table, and add a new | ||
88 | entry to this table with your get/set method names using the | ||
89 | SNC_HANDLE_NAMES macro). | ||
90 | |||
91 | Your mission, should you accept it, is to try finding out what | ||
92 | those entries are for, by reading/writing random values from/to those | ||
93 | files and find out what is the impact on your laptop. | ||
94 | |||
95 | Should you find anything interesting, please report it back to me, | ||
96 | I will not disavow all knowledge of your actions :) | ||
97 | |||
98 | See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other | ||
99 | useful info. | ||
100 | |||
101 | Bugs/Limitations: | ||
102 | ----------------- | ||
103 | |||
104 | * This driver is not based on official documentation from Sony | ||
105 | (because there is none), so there is no guarantee this driver | ||
106 | will work at all, or do the right thing. Although this hasn't | ||
107 | happened to me, this driver could do very bad things to your | ||
108 | laptop, including permanent damage. | ||
109 | |||
110 | * The sony-laptop and sonypi drivers do not interact at all. In the | ||
111 | future, sonypi could use sony-laptop to do (part of) its business. | ||
112 | |||
113 | * spicctrl, which is the userspace tool used to communicate with the | ||
114 | sonypi driver (through /dev/sonypi) does not try to use the | ||
115 | sony-laptop driver. In the future, spicctrl could try sonypi first, | ||
116 | and if it isn't present, try sony-laptop instead. | ||