sony-laptop.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. This mini-driver drives the SNC device present in the ACPI BIOS of
  6. the Sony Vaio laptops.
  7. It gives access to some extra laptop functionalities. In its current
  8. form, this driver let the user set or query the screen brightness
  9. through the backlight subsystem and remove/apply power to some devices.
  10. Backlight control:
  11. ------------------
  12. If your laptop model supports it, you will find sysfs files in the
  13. /sys/class/backlight/sony/
  14. directory. You will be able to query and set the current screen
  15. brightness:
  16. brightness get/set screen brightness (an iteger
  17. between 0 and 7)
  18. actual_brightness reading from this file will query the HW
  19. to get real brightness value
  20. max_brightness the maximum brightness value
  21. Platform specific:
  22. ------------------
  23. Loading the sony-laptop module will create a
  24. /sys/devices/platform/sony-laptop/
  25. directory populated with some files.
  26. You then read/write integer values from/to those files by using
  27. standard UNIX tools.
  28. The files are:
  29. brightness_default screen brightness which will be set
  30. when the laptop will be rebooted
  31. cdpower power on/off the internal CD drive
  32. audiopower power on/off the internal sound card
  33. lanpower power on/off the internal ethernet card
  34. (only in debug mode)
  35. Note that some files may be missing if they are not supported
  36. by your particular laptop model.
  37. Example usage:
  38. # echo "1" > /sys/devices/platform/sony-laptop/brightness_default
  39. sets the lowest screen brightness for the next and later reboots,
  40. # echo "8" > /sys/devices/platform/sony-laptop/brightness_default
  41. sets the highest screen brightness for the next and later reboots,
  42. # cat /sys/devices/platform/sony-laptop/brightness_default
  43. retrieves the value.
  44. # echo "0" > /sys/devices/platform/sony-laptop/audiopower
  45. powers off the sound card,
  46. # echo "1" > /sys/devices/platform/sony-laptop/audiopower
  47. powers on the sound card.
  48. Development:
  49. ------------
  50. If you want to help with the development of this driver (and
  51. you are not afraid of any side effects doing strange things with
  52. your ACPI BIOS could have on your laptop), load the driver and
  53. pass the option 'debug=1'.
  54. REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
  55. In your kernel logs you will find the list of all ACPI methods
  56. the SNC device has on your laptop. You can see the GCDP/GCDP methods
  57. used to pwer on/off the CD drive, but there are others.
  58. I HAVE NO IDEA WHAT THOSE METHODS DO.
  59. The sony-laptop driver creates, for some of those methods (the most
  60. current ones found on several Vaio models), an entry under
  61. /sys/devices/platform/sony-laptop, just like the 'cdpower' one.
  62. You can create other entries corresponding to your own laptop methods by
  63. further editing the source (see the 'sony_acpi_values' table, and add a new
  64. entry to this table with your get/set method names using the
  65. HANDLE_NAMES macro).
  66. Your mission, should you accept it, is to try finding out what
  67. those entries are for, by reading/writing random values from/to those
  68. files and find out what is the impact on your laptop.
  69. Should you find anything interesting, please report it back to me,
  70. I will not disavow all knowledge of your actions :)
  71. Bugs/Limitations:
  72. -----------------
  73. * This driver is not based on official documentation from Sony
  74. (because there is none), so there is no guarantee this driver
  75. will work at all, or do the right thing. Although this hasn't
  76. happened to me, this driver could do very bad things to your
  77. laptop, including permanent damage.
  78. * The sony-laptop and sonypi drivers do not interact at all. In the
  79. future, sonypi could use sony-laptop to do (part of) its business.
  80. * spicctrl, which is the userspace tool used to communicate with the
  81. sonypi driver (through /dev/sonypi) does not try to use the
  82. sony-laptop driver. In the future, spicctrl could try sonypi first,
  83. and if it isn't present, try sony-laptop instead.