#include <linux/module.h>
#include <linux/sched.h>
#include <linux/input.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/miscdevice.h>
#include <linux/poll.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/kfifo.h>
#include <linux/platform_device.h>
#include <linux/gfp.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/sonypi.h>
Go to the source code of this file.
|
| MODULE_AUTHOR ("Stelian Pop <[email protected]>") |
|
| MODULE_DESCRIPTION ("Sony Programmable I/O Control Device driver") |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_VERSION (SONYPI_DRIVER_VERSION) |
|
| module_param (minor, int, 0) |
|
| MODULE_PARM_DESC (minor,"minor number of the misc device, default is -1 (automatic)") |
|
| module_param (verbose, int, 0644) |
|
| MODULE_PARM_DESC (verbose,"be verbose, default is 0 (no)") |
|
| module_param (fnkeyinit, int, 0444) |
|
| MODULE_PARM_DESC (fnkeyinit,"set this if your Fn keys do not generate any event") |
|
| module_param (camera, int, 0444) |
|
| MODULE_PARM_DESC (camera,"set this if you have a MotionEye camera (PictureBook series)") |
|
| module_param (compat, int, 0444) |
|
| MODULE_PARM_DESC (compat,"set this if you want to enable backward compatibility mode") |
|
| module_param (mask, ulong, 0644) |
|
| MODULE_PARM_DESC (mask,"set this to the mask of event you want to enable (see doc)") |
|
| module_param (useinput, int, 0444) |
|
| MODULE_PARM_DESC (useinput,"set this if you would like sonypi to feed events to the input subsystem") |
|
| module_param (check_ioport, int, 0444) |
|
| MODULE_PARM_DESC (check_ioport,"set this to 0 if you think the automatic ioport check for sony-laptop is wrong") |
|
| module_init (sonypi_init) |
|
| module_exit (sonypi_exit) |
|
#define ITERATIONS_LONG 10000 |
#define ITERATIONS_SHORT 10 |
#define SONYPI_ACPI_ACTIVE 0 |
#define SONYPI_BACK_MASK 0x00000020 |
#define SONYPI_BAT1_FULL 0xb2 |
#define SONYPI_BAT1_LEFT 0xa2 |
#define SONYPI_BAT1_MAXRT 0xa4 |
#define SONYPI_BAT1_MAXTK 0xb0 |
#define SONYPI_BAT1_PCTRM 0xa0 |
#define SONYPI_BAT2_FULL 0xba |
#define SONYPI_BAT2_LEFT 0xaa |
#define SONYPI_BAT2_MAXRT 0xac |
#define SONYPI_BAT2_MAXTK 0xb8 |
#define SONYPI_BAT2_PCTRM 0xa8 |
#define SONYPI_BAT_FLAGS 0x81 |
#define SONYPI_BATTERY_MASK 0x00001000 |
#define SONYPI_BLUETOOTH_MASK 0x00000008 |
#define SONYPI_BUF_SIZE 128 |
#define SONYPI_CAMERA_AGC 6 |
#define SONYPI_CAMERA_AGC_MASK 0x30 |
#define SONYPI_CAMERA_BRIGHTNESS 0 |
#define SONYPI_CAMERA_COLOR 3 |
#define SONYPI_CAMERA_CONTRAST 1 |
#define SONYPI_CAMERA_CONTROL 0x10 |
#define SONYPI_CAMERA_EXPOSURE_MASK 0xC |
#define SONYPI_CAMERA_HUE 2 |
#define SONYPI_CAMERA_MUTE_MASK 0x40 |
#define SONYPI_CAMERA_PICTURE 5 |
#define SONYPI_CAMERA_PICTURE_MODE_MASK 0x30 |
#define SONYPI_CAMERA_REVISION 8 |
#define SONYPI_CAMERA_ROMVERSION 9 |
#define SONYPI_CAMERA_SHARPNESS 4 |
#define SONYPI_CAMERA_SHUTDOWN_REQUEST 7 |
#define SONYPI_CAMERA_SHUTTER_MASK 0x7 |
#define SONYPI_CAMERA_STATUS 7 |
#define SONYPI_CAMERA_STATUS_POSITION 0x4 |
#define SONYPI_CAMERA_STATUS_READY 0x2 |
#define SONYPI_CAMERA_WHITE_BALANCE_MASK 0x3 |
#define SONYPI_CAPTURE_MASK 0x00000002 |
#define SONYPI_CST_IOPORT 0x66 |
#define SONYPI_DATA_IOPORT 0x62 |
#define SONYPI_DEVICE_MODEL_TYPE1 1 |
#define SONYPI_DEVICE_MODEL_TYPE2 2 |
#define SONYPI_DEVICE_MODEL_TYPE3 3 |
#define SONYPI_DIRECTION_BACKWARDS 0x4 |
#define SONYPI_DRIVER_VERSION "1.26" |
#define SONYPI_FAN0_STATUS 0x93 |
#define SONYPI_FNKEY_MASK 0x00000004 |
#define SONYPI_HELP_MASK 0x00000040 |
#define SONYPI_IRQ_PORT 0x8034 |
#define SONYPI_IRQ_SHIFT 22 |
#define SONYPI_JOGGER_MASK 0x00000001 |
#define SONYPI_LCD_LIGHT 0x96 |
#define SONYPI_LID_MASK 0x00000080 |
#define SONYPI_MEMORYSTICK_MASK 0x00000800 |
#define SONYPI_MEYE_MASK 0x00000400 |
#define SONYPI_PKEY_MASK 0x00000010 |
#define SONYPI_TEMP_STATUS 0xC1 |
#define SONYPI_THUMBPHRASE_MASK 0x00000200 |
#define SONYPI_TYPE1_BASE 0x50 |
#define SONYPI_TYPE1_EVTYPE_OFFSET 0x04 |
#define SONYPI_TYPE1_REGION_SIZE 0x08 |
#define SONYPI_TYPE2_EVTYPE_OFFSET 0x12 |
#define SONYPI_TYPE2_REGION_SIZE 0x20 |
#define SONYPI_TYPE3_BASE 0x40 |
#define SONYPI_TYPE3_EVTYPE_OFFSET 0x12 |
#define SONYPI_TYPE3_REGION_SIZE 0x20 |
#define SONYPI_WIRELESS_MASK 0x00002000 |
#define SONYPI_ZOOM_MASK 0x00000100 |
Value:{ \
unsigned
int n = iterations; \
udelay(1); \
printk(
KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __func__, __LINE__); \
}
Definition at line 505 of file sonypi.c.
module_exit |
( |
sonypi_exit |
| ) |
|
module_init |
( |
sonypi_init |
| ) |
|
module_param |
( |
fnkeyinit |
, |
|
|
int |
, |
|
|
0444 |
|
|
) |
| |
module_param |
( |
camera |
, |
|
|
int |
, |
|
|
0444 |
|
|
) |
| |
module_param |
( |
compat |
, |
|
|
int |
, |
|
|
0444 |
|
|
) |
| |
module_param |
( |
useinput |
, |
|
|
int |
, |
|
|
0444 |
|
|
) |
| |
module_param |
( |
check_ioport |
, |
|
|
int |
, |
|
|
0444 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
verbose |
, |
|
|
"be |
verbose, |
|
|
default is 0(no)" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
fnkeyinit |
, |
|
|
"set this if your Fn keys do not generate any event" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
camera |
, |
|
|
"set this if you have a MotionEye camera (PictureBook series)" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
compat |
, |
|
|
"set this if you want to enable backward compatibility mode" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
useinput |
, |
|
|
"set this if you would like sonypi to feed events to the input subsystem" |
|
|
) |
| |