URL
https://opencores.org/ocsvn/test_project/test_project/trunk
Subversion Repositories test_project
[/] [test_project/] [trunk/] [linux_sd_driver/] [Documentation/] [sonypi.txt] - Rev 62
Compare with Previous | Blame | View Log
Sony Programmable I/O Control Device Driver Readme--------------------------------------------------Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>Copyright (C) 2001-2002 Alcôve <www.alcove.com>Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>This driver enables access to the Sony Programmable I/O Control Device whichcan be found in many Sony Vaio laptops. Some newer Sony laptops (seems to belimited to new FX series laptops, at least the FX501 and the FX702) lack asonypi device and are not supported at all by this driver.It will give access (through a user space utility) to some events those laptopsgenerate, like:- jogdial events (the small wheel on the side of Vaios)- capture button events (only on Vaio Picturebook series)- Fn keys- bluetooth button (only on C1VR model)- programmable keys, back, help, zoom, thumbphrase buttons, etc.(when available)Those events (see linux/sonypi.h) can be polled using the character device node/dev/sonypi (major 10, minor auto allocated or specified as a option).A simple daemon which translates the jogdial movements into mouse wheel eventscan be downloaded at: <http://popies.net/sonypi/>Another option to intercept the events is to get them directly through theinput layer.This driver supports also some ioctl commands for setting the LCD screenbrightness and querying the batteries charge information (some morecommands may be added in the future).This driver can also be used to set the camera controls on Picturebook series(brightness, contrast etc), and is used by the video4linux driver for theMotion Eye camera.Please note that this driver was created by reverse engineering the Windowsdriver and the ACPI BIOS, because Sony doesn't agree to release any programmingspecs for its laptops. If someone convinces them to do so, drop me a note.Driver options:---------------Several options can be passed to the sonypi driver using the standardmodule argument syntax (<param>=<value> when passing the option to themodule or sonypi.<param>=<value> on the kernel boot line when sonypi isstatically linked into the kernel). Those options are:minor: minor number of the misc device /dev/sonypi,default is -1 (automatic allocation, see /proc/miscor kernel logs)camera: if you have a PictureBook series Vaio (with theintegrated MotionEye camera), set this parameter to 1in order to let the driver access to the camerafnkeyinit: on some Vaios (C1VE, C1VR etc), the Fn key events don'tget enabled unless you set this parameter to 1.Do not use this option unless it's actually necessary,some Vaio models don't deal well with this option.This option is available only if the kernel iscompiled without ACPI support (since it conflictswith it and it shouldn't be required anyway ifACPI is already enabled).verbose: set to 1 to print unknown events received from thesonypi device.set to 2 to print all events received from thesonypi device.compat: uses some compatibility code for enabling the sonypievents. If the driver worked for you in the past(prior to version 1.5) and does not work anymore,add this option and report to the author.mask: event mask telling the driver what events will bereported to the user. This parameter is required forsome Vaio models where the hardware reuses valuesused in other Vaio models (like the FX series who doesnot have a jogdial but reuses the jogdial events forprogrammable keys events). The default event mask isset to 0xffffffff, meaning that all possible eventswill be tried. You can use the following bits toconstruct your own event mask (fromdrivers/char/sonypi.h):SONYPI_JOGGER_MASK 0x0001SONYPI_CAPTURE_MASK 0x0002SONYPI_FNKEY_MASK 0x0004SONYPI_BLUETOOTH_MASK 0x0008SONYPI_PKEY_MASK 0x0010SONYPI_BACK_MASK 0x0020SONYPI_HELP_MASK 0x0040SONYPI_LID_MASK 0x0080SONYPI_ZOOM_MASK 0x0100SONYPI_THUMBPHRASE_MASK 0x0200SONYPI_MEYE_MASK 0x0400SONYPI_MEMORYSTICK_MASK 0x0800SONYPI_BATTERY_MASK 0x1000SONYPI_WIRELESS_MASK 0x2000useinput: if set (which is the default) two input devices arecreated, one which interprets the jogdial events asmouse events, the other one which acts like akeyboard reporting the pressing of the special keys.Module use:-----------In order to automatically load the sonypi module on use, you can put thoselines in your /etc/modprobe.conf file:alias char-major-10-250 sonypioptions sonypi minor=250This supposes the use of minor 250 for the sonypi device:# mknod /dev/sonypi c 10 250Bugs:------ several users reported that this driver disables the BIOS-managedFn-keys which put the laptop in sleeping state, or switch theexternal monitor on/off. There is no workaround yet, since thisdriver disables all APM management for those keys, by enabling theACPI management (and the ACPI core stuff is not complete yet). Ifyou have one of those laptops with working Fn keys and want tocontinue to use them, don't use this driver.- some users reported that the laptop speed is lower (dhrystonetested) when using the driver with the fnkeyinit parameter. I cannotreproduce it on my laptop and not all users have this problem.This happens because the fnkeyinit parameter enables the ACPImode (but without additional ACPI control, like processorspeed handling etc). Use ACPI instead of APM if it works on yourlaptop.- sonypi lacks the ability to distinguish between certain keyevents on some models.- some models with the nvidia card (geforce go 6200 tc) uses adifferent way to adjust the backlighting of the screen. Thereis a userspace utility to adjust the brightness on those models,which can be downloaded fromhttp://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2- since all development was done by reverse engineering, there is_absolutely no guarantee_ that this driver will not crash yourlaptop. Permanently.
