[Pommed-commits] r314 - in trunk: . pommed
Julien Blache
jblache at alioth.debian.org
Sat Apr 28 11:43:37 UTC 2007
Author: jblache
Date: 2007-04-28 11:43:37 +0000 (Sat, 28 Apr 2007)
New Revision: 314
Modified:
trunk/ChangeLog
trunk/pommed/Makefile
trunk/pommed/evdev.c
trunk/pommed/evdev.h
trunk/pommed/pommed.c
Log:
Add Geyser keyboard identification, PowerBook5,8 (at least) and later.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-04-25 17:23:31 UTC (rev 313)
+++ trunk/ChangeLog 2007-04-28 11:43:37 UTC (rev 314)
@@ -2,8 +2,9 @@
--------------------
version 1.4:
+ - pommed: add Geyser keyboard identification, PowerBook5,8 (at
+ least) and later.
-
version 1.3:
- gpomme: added configuration GUI, courtesy of Daniel G. SIEGEL.
- gpomme: added elegant-bright and elegant-dark themes, courtesy
Modified: trunk/pommed/Makefile
===================================================================
--- trunk/pommed/Makefile 2007-04-25 17:23:31 UTC (rev 313)
+++ trunk/pommed/Makefile 2007-04-28 11:43:37 UTC (rev 314)
@@ -15,7 +15,7 @@
ifeq ($(ARCH), ppc)
OFLIB ?=
-
+CFLAGS += -D__powerpc__
LDFLAGS = -lz $(DBUS_LIBS) $(ALSA_LIBS) $(CONFUSE_LIBS)
SOURCES = pommed.c cd_eject.c evdev.c conffile.c audio.c dbus.c \
Modified: trunk/pommed/evdev.c
===================================================================
--- trunk/pommed/evdev.c 2007-04-25 17:23:31 UTC (rev 313)
+++ trunk/pommed/evdev.c 2007-04-28 11:43:37 UTC (rev 314)
@@ -255,6 +255,32 @@
return 0;
}
+int
+evdev_is_geyser(unsigned short *id)
+{
+ unsigned short product = id[ID_PRODUCT];
+
+ if (id[ID_BUS] != BUS_USB)
+ return 0;
+
+ if (id[ID_VENDOR] != USB_VENDOR_ID_APPLE)
+ return 0;
+
+ if ((product == USB_PRODUCT_ID_GEYSER_ANSI)
+ || (product == USB_PRODUCT_ID_GEYSER_ISO)
+ || (product == USB_PRODUCT_ID_GEYSER_JIS))
+ {
+ if (evdevs & EVDEV_USB_KBD1)
+ evdevs |= EVDEV_USB_KBD2;
+ else
+ evdevs |= EVDEV_USB_KBD1;
+
+ return 1;
+ }
+
+ return 0;
+}
+
/* PMU Lid switch */
static int
evdev_is_lidswitch(unsigned short *id)
Modified: trunk/pommed/evdev.h
===================================================================
--- trunk/pommed/evdev.h 2007-04-25 17:23:31 UTC (rev 313)
+++ trunk/pommed/evdev.h 2007-04-28 11:43:37 UTC (rev 314)
@@ -23,6 +23,11 @@
#define USB_PRODUCT_ID_FOUNTAIN_ISO 0x020f
#define USB_PRODUCT_ID_FOUNTAIN_JIS 0x0210
+/* Apple Geyser keyboard + trackpad */
+#define USB_PRODUCT_ID_GEYSER_ANSI 0x0214
+#define USB_PRODUCT_ID_GEYSER_ISO 0x0215
+#define USB_PRODUCT_ID_GEYSER_JIS 0x0216
+
/* Apple Geyser III keyboard + trackpad */
#define USB_PRODUCT_ID_GEYSER3_ANSI 0x0217
#define USB_PRODUCT_ID_GEYSER3_ISO 0x0218
@@ -72,6 +77,9 @@
int
evdev_is_fountain(unsigned short *id);
+int
+evdev_is_geyser(unsigned short *id);
+
#else
int
Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c 2007-04-25 17:23:31 UTC (rev 313)
+++ trunk/pommed/pommed.c 2007-04-28 11:43:37 UTC (rev 314)
@@ -153,14 +153,14 @@
.type = MACHINE_POWERBOOK_58,
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
- .evdev_identify = evdev_is_fountain,
+ .evdev_identify = evdev_is_geyser,
},
{ /* PowerBook5,9 */
.type = MACHINE_POWERBOOK_59,
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
- .evdev_identify = evdev_is_fountain,
+ .evdev_identify = evdev_is_geyser,
},
/* G4 iBooks & 12" PowerBooks */
More information about the Pommed-commits
mailing list