Skip to contentSkip to conversation

sonypi driver update

PATCH New Stelian Pop 1 participant 1 message Nov 22, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sonypi driver update

Hi,

This patch updates the sonypi driver to the latest version.

The most important changes are:
* add suspend/resume support to the sonypi driver (not based on driverfs however) (Florian Lohoff);
* add "Zoom" and "Thumbphrase" buttons (Francois Gurin);
* add camera and lid events for C1XE (Kunihiko IMAI);
* add a mask parameter letting the user choose what kind of events he wants;
* use ACPI ec_read/ec_write when available in order to play nice when latest ACPI is enabled;
* several source cleanups.

Linus, please apply.

Stelian.

===== Documentation/sonypi.txt 1.8 vs edited =====

Documentation/sonypi.txt +30 -8
@@ -1,6 +1,7 @@
 Sony Programmable I/O Control Device Driver Readme
 --------------------------------------------------
-	Copyright (C) 2001 Stelian Pop <[email protected]>, Alcôve
+	Copyright (C) 2001-2002 Stelian Pop <[email protected]>
+	Copyright (C) 2001-2002 Alcôve <www.alcove.com>
 	Copyright (C) 2001 Michael Ashley <[email protected]>
 	Copyright (C) 2001 Junichi Morita <[email protected]>
 	Copyright (C) 2000 Takaya Kinjo <[email protected]>
@@ -15,14 +16,14 @@
 	- capture button events (only on Vaio Picturebook series)
 	- Fn keys
 	- bluetooth button (only on C1VR model)
-	- back button (PCG-GR7/K model)
-	- lid open/close events (Z600NE 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 events
-can be downloaded at: <http://www.alcove-labs.org/en/software/sonypi/>
+can be downloaded at: <http://popies.net/sonypi/>
 
 This driver supports also some ioctl commands for setting the LCD screen
 brightness and querying the batteries charge information (some more 
@@ -43,7 +44,7 @@
 to /etc/modules.conf file, when the driver is compiled as a module or by
 adding the following to the kernel command line (in your bootloader):
 
-	sonypi=minor[,verbose[,fnkeyinit[,camera[,compat[,nojogdial]]]]]
+	sonypi=minor[,verbose[,fnkeyinit[,camera[,compat[,mask]]]]]
 
 where:
 
@@ -64,15 +65,36 @@
 			with it and it shouldn't be required anyway if 
 			ACPI is already enabled).
 
-	verbose:	print unknown events from the sonypi device
+	verbose:	set to 1 to print unknown events received from the 
+			sonypi device.
+			set to 2 to print all events received from the 
+			sonypi device.
 
 	compat:		uses some compatibility code for enabling the sonypi
 			events. 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.
 
-	nojogdial:	gives more accurate PKEY events on those Vaio models
-			which don't have a jogdial (like the FX series).
+	mask:		event mask telling the driver what events will be
+			reported to the user. This parameter is required for some 
+			Vaio models where the hardware reuses values used in 
+			other Vaio models (like the FX series who does not
+			have a jogdial but reuses the jogdial events for
+			programmable keys events). The default event mask is
+			set to 0xffffffff, meaning that all possible events will be
+			tried. You can use the following bits to construct
+			your own event mask (from drivers/char/sonypi.h):
+				SONYPI_JOGGER_MASK 		0x0001
+				SONYPI_CAPTURE_MASK 		0x0002
+				SONYPI_FNKEY_MASK 		0x0004
+				SONYPI_BLUETOOTH_MASK 		0x0008
+				SONYPI_PKEY_MASK 		0x0010
+				SONYPI_BACK_MASK 		0x0020
+				SONYPI_HELP_MASK 		0x0040
+				SONYPI_LID_MASK 		0x0080
+				SONYPI_ZOOM_MASK 		0x0100
+				SONYPI_THUMBPHRASE_MASK 	0x0200
+				SONYPI_MEYE_MASK		0x0400
 
 Module use:
 -----------

===== include/linux/sonypi.h 1.5 vs edited =====

include/linux/sonypi.h +7 -1
@@ -1,7 +1,9 @@
 /* 
  * Sony Programmable I/O Control Device driver for VAIO
  *
- * Copyright (C) 2001 Stelian Pop <[email protected]>, Alcôve
+ * Copyright (C) 2001-2002 Stelian Pop <[email protected]>
+ *
+ * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
  *
  * Copyright (C) 2001 Michael Ashley <[email protected]>
  *
@@ -85,6 +87,10 @@
 #define SONYPI_EVENT_JOGDIAL_VFAST_UP		47
 #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED	48
 #define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED	49
+#define SONYPI_EVENT_ZOOM_PRESSED		50
+#define SONYPI_EVENT_THUMBPHRASE_PRESSED	51
+#define SONYPI_EVENT_MEYE_FACE			52
+#define SONYPI_EVENT_MEYE_OPPOSITE		53
 
 /* get/set brightness */
 #define SONYPI_IOCGBRT		_IOR('v', 0, __u8)

===== drivers/char/sonypi.h 1.11 vs edited =====

drivers/char/sonypi.h +115 -28

230 lines not on this page · raw message

===== drivers/char/sonypi.c 1.11 vs edited =====

drivers/char/sonypi.c +146 -142

457 lines not on this page · raw message

Signature · 1 line
Stelian Pop <[email protected]>