]> bbs.cooldavid.org Git - net-next-2.6.git/blame - Documentation/laptops/sony-laptop.txt
ipv6: AF_INET6 link address family
[net-next-2.6.git] / Documentation / laptops / sony-laptop.txt
CommitLineData
ab5bd206
MD
1Sony 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
3d2b8a9f 6This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the
7Sony Vaio laptops. This driver mixes both devices functions under the same
8(hopefully consistent) interface. This also means that the sonypi driver is
9obsoleted by sony-laptop now.
ab5bd206 10
3d2b8a9f 11Fn keys (hotkeys):
12------------------
13Some models report hotkeys through the SNC or SPIC devices, such events are
14reported both through the ACPI subsystem as acpi events and through the INPUT
15subsystem. 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
17devices are created by the driver.
ab5bd206
MD
18
19Backlight control:
20------------------
21If your laptop model supports it, you will find sysfs files in the
22/sys/class/backlight/sony/
23directory. You will be able to query and set the current screen
24brightness:
19f59460 25 brightness get/set screen brightness (an integer
ab5bd206
MD
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
32Platform specific:
33------------------
34Loading the sony-laptop module will create a
35/sys/devices/platform/sony-laptop/
36directory populated with some files.
37
38You then read/write integer values from/to those files by using
39standard UNIX tools.
40
41The 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)
3d2b8a9f 48 bluetoothpower power on/off the internal bluetooth device
49 fanspeed get/set the fan speed
ab5bd206
MD
50
51Note that some files may be missing if they are not supported
52by your particular laptop model.
53
54Example usage:
55 # echo "1" > /sys/devices/platform/sony-laptop/brightness_default
56sets the lowest screen brightness for the next and later reboots,
57 # echo "8" > /sys/devices/platform/sony-laptop/brightness_default
58sets the highest screen brightness for the next and later reboots,
59 # cat /sys/devices/platform/sony-laptop/brightness_default
60retrieves the value.
61
62 # echo "0" > /sys/devices/platform/sony-laptop/audiopower
63powers off the sound card,
64 # echo "1" > /sys/devices/platform/sony-laptop/audiopower
65powers on the sound card.
66
67Development:
68------------
69
70If you want to help with the development of this driver (and
71you are not afraid of any side effects doing strange things with
72your ACPI BIOS could have on your laptop), load the driver and
73pass the option 'debug=1'.
74
75REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
76
77In your kernel logs you will find the list of all ACPI methods
78the SNC device has on your laptop. You can see the GCDP/GCDP methods
79used to pwer on/off the CD drive, but there are others.
80
81I HAVE NO IDEA WHAT THOSE METHODS DO.
82
83The sony-laptop driver creates, for some of those methods (the most
84current ones found on several Vaio models), an entry under
85/sys/devices/platform/sony-laptop, just like the 'cdpower' one.
86You can create other entries corresponding to your own laptop methods by
3d2b8a9f 87further editing the source (see the 'sony_nc_values' table, and add a new
ab5bd206 88entry to this table with your get/set method names using the
3d2b8a9f 89SNC_HANDLE_NAMES macro).
ab5bd206
MD
90
91Your mission, should you accept it, is to try finding out what
92those entries are for, by reading/writing random values from/to those
93files and find out what is the impact on your laptop.
94
95Should you find anything interesting, please report it back to me,
96I will not disavow all knowledge of your actions :)
97
3d2b8a9f 98See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other
99useful info.
100
ab5bd206
MD
101Bugs/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.