[Pommed-commits] r372 - in trunk: . pommed
jblache at alioth.debian.org
jblache at alioth.debian.org
Thu Nov 15 08:52:57 UTC 2007
Author: jblache
Date: 2007-11-15 08:52:57 +0000 (Thu, 15 Nov 2007)
New Revision: 372
Modified:
trunk/ChangeLog
trunk/README
trunk/pommed/evdev.c
trunk/pommed/evdev.h
trunk/pommed/pommed.c
trunk/pommed/pommed.h
Log:
Partial support (ie. no LCD backlight yet) for the MacBook3,1 (MacBook Core2 Duo Santa Rosa, November 2007)
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/ChangeLog 2007-11-15 08:52:57 UTC (rev 372)
@@ -5,6 +5,8 @@
- pommed: beep on volume change, now that we have the audio code
in pommed itself.
- gpomme: remove audio-related code.
+ - pommed: partial support (ie. no LCD backlight yet) for the
+ MacBook3,1 (MacBook Core2 Duo Santa Rosa, November 2007).
version 1.10:
- pommed: add a beeper feature as a substitute to the missing PC
Modified: trunk/README
===================================================================
--- trunk/README 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/README 2007-11-15 08:52:57 UTC (rev 372)
@@ -21,6 +21,7 @@
* MacBook Pro Core2 Duo 17" (October 2006 & June 2007)
* MacBook Core Duo (May 2006)
* MacBook Core2 Duo (November 2006 & May 2007)
+ * MacBook Core2 Duo Santa Rosa (November 2007)
- PowerMac machines
Modified: trunk/pommed/evdev.c
===================================================================
--- trunk/pommed/evdev.c 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/pommed/evdev.c 2007-11-15 08:52:57 UTC (rev 372)
@@ -398,6 +398,35 @@
return 0;
}
+/* Core2 Duo Santa Rosa MacBook (MacBook3,1) */
+int
+evdev_is_geyser4hf(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_GEYSER4HF_ANSI)
+ || (product == USB_PRODUCT_ID_GEYSER4HF_ISO)
+ || (product == USB_PRODUCT_ID_GEYSER4HF_JIS))
+ {
+ logdebug(" -> Geyser IV-HF USB keyboard\n");
+
+ if (evdevs & EVDEV_USB_KBD1)
+ evdevs |= EVDEV_USB_KBD2;
+ else
+ evdevs |= EVDEV_USB_KBD1;
+
+ return 1;
+ }
+
+ return 0;
+}
+
/* Apple Remote IR Receiver */
static int
evdev_is_appleir(unsigned short *id)
Modified: trunk/pommed/evdev.h
===================================================================
--- trunk/pommed/evdev.h 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/pommed/evdev.h 2007-11-15 08:52:57 UTC (rev 372)
@@ -38,6 +38,11 @@
#define USB_PRODUCT_ID_GEYSER4_ISO 0x021b
#define USB_PRODUCT_ID_GEYSER4_JIS 0x021c
+/* Apple Geyser IV-HF keyboard + trackpad */
+#define USB_PRODUCT_ID_GEYSER4HF_ANSI 0x0229
+#define USB_PRODUCT_ID_GEYSER4HF_ISO 0x022a
+#define USB_PRODUCT_ID_GEYSER4HF_JIS 0x022b
+
/* Apple Remote IR Receiver */
#define USB_PRODUCT_ID_APPLEIR 0x8240
#define USB_PRODUCT_ID_APPLEIR_2 0x8242
@@ -88,6 +93,9 @@
int
evdev_is_geyser4(unsigned short *id);
+
+int
+evdev_is_geyser4hf(unsigned short *id);
#endif /* __powerpc__ */
Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/pommed/pommed.c 2007-11-15 08:52:57 UTC (rev 372)
@@ -241,6 +241,28 @@
#else
+/* Dummy backlight ops */
+
+int
+dummy_backlight_probe(void)
+{
+ logmsg(LOG_WARNING, "Backlight not supported on this model yet");
+
+ return 0;
+}
+
+void
+dummy_backlight_step(int dir)
+{
+ /* void */
+}
+
+void
+dummy_backlight_toggle(int lvl)
+{
+ /* void */
+}
+
struct machine_ops mb_mops[] = {
/* MacBook Pro machines */
@@ -284,6 +306,14 @@
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
.evdev_identify = evdev_is_geyser4,
+ },
+
+ { /* MacBook3,1 (Core2 Duo Santa Rosa, November 2007) */
+ .type = MACHINE_MACBOOK_3,
+ .lcd_backlight_probe = dummy_backlight_probe,
+ .lcd_backlight_step = dummy_backlight_step,
+ .lcd_backlight_toggle = dummy_backlight_toggle,
+ .evdev_identify = evdev_is_geyser4hf,
}
};
#endif /* __powerpc__ */
@@ -568,6 +598,9 @@
/* Core2 Duo MacBook (November 2006) */
else if (strcmp(prop, "MacBook2,1") == 0)
ret = MACHINE_MACBOOK_2;
+ /* Core2 Duo Santa Rosa MacBook (November 2007) */
+ else if (strcmp(prop, "MacBook3,1") == 0)
+ ret = MACHINE_MACBOOK_3;
else
logmsg(LOG_ERR, "Unknown Apple machine: %s", prop);
Modified: trunk/pommed/pommed.h
===================================================================
--- trunk/pommed/pommed.h 2007-11-09 13:09:48 UTC (rev 371)
+++ trunk/pommed/pommed.h 2007-11-15 08:52:57 UTC (rev 372)
@@ -35,6 +35,7 @@
MACHINE_MACBOOKPRO_3,
MACHINE_MACBOOK_1,
MACHINE_MACBOOK_2,
+ MACHINE_MACBOOK_3,
#else
MACHINE_POWERBOOK_32,
MACHINE_POWERBOOK_33,
More information about the Pommed-commits
mailing list