[Pommed-commits] r460 - in trunk: . pommed
jblache at alioth.debian.org
jblache at alioth.debian.org
Sun May 18 09:56:51 UTC 2008
Author: jblache
Date: 2008-05-18 09:56:51 +0000 (Sun, 18 May 2008)
New Revision: 460
Modified:
trunk/ChangeLog
trunk/pommed/evdev.c
trunk/pommed/evdev.h
trunk/pommed/pommed.c
trunk/pommed/pommed.h
Log:
Relax event devices identification for internal keyboard.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-17 20:37:19 UTC (rev 459)
+++ trunk/ChangeLog 2008-05-18 09:56:51 UTC (rev 460)
@@ -3,6 +3,7 @@
version 1.18:
- pommed: add more IDs for Apple external keyboards
+ - pommed: relax event devices identification for internal keyboard.
version 1.17:
- pommed: handle path change for the applesmc led interface
Modified: trunk/pommed/evdev.c
===================================================================
--- trunk/pommed/evdev.c 2008-05-17 20:37:19 UTC (rev 459)
+++ trunk/pommed/evdev.c 2008-05-18 09:56:51 UTC (rev 460)
@@ -438,7 +438,7 @@
#ifdef __powerpc__
/* PowerBook G4 Titanium */
-int
+static int
evdev_is_adb(unsigned short *id)
{
unsigned short product = id[ID_PRODUCT];
@@ -467,7 +467,7 @@
}
/* PowerBook G4 */
-int
+static int
evdev_is_fountain(unsigned short *id)
{
unsigned short product = id[ID_PRODUCT];
@@ -490,7 +490,7 @@
return 0;
}
-int
+static int
evdev_is_geyser(unsigned short *id)
{
unsigned short product = id[ID_PRODUCT];
@@ -515,6 +515,16 @@
return 0;
}
+/* Any internal keyboard */
+static int
+evdev_is_internal(unsigned short *id)
+{
+ return (evdev_is_adb(id)
+ || evdev_is_fountain(id)
+ || evdev_is_geyser(id));
+}
+
+
/* PMU Lid switch */
static int
evdev_is_lidswitch(unsigned short *id)
@@ -673,6 +683,18 @@
return 0;
}
+/* Any internal keyboard */
+static int
+evdev_is_internal(unsigned short *id)
+{
+ return (evdev_is_geyser3(id)
+ || evdev_is_geyser4(id)
+ || evdev_is_geyser4hf(id)
+ || evdev_is_wellspring(id)
+ || evdev_is_wellspring2(id));
+}
+
+
/* Apple Remote IR Receiver */
static int
evdev_is_appleir(unsigned short *id)
@@ -841,7 +863,7 @@
ioctl(fd, EVIOCGID, id);
- if ((!mops->evdev_identify(id))
+ if ((!evdev_is_internal(id))
#ifndef __powerpc__
&& !(appleir_cfg.enabled && evdev_is_appleir(id))
#endif
Modified: trunk/pommed/evdev.h
===================================================================
--- trunk/pommed/evdev.h 2008-05-17 20:37:19 UTC (rev 459)
+++ trunk/pommed/evdev.h 2008-05-18 09:56:51 UTC (rev 460)
@@ -106,37 +106,7 @@
int
evdev_event_loop(void);
-
-#ifdef __powerpc__
int
-evdev_is_adb(unsigned short *id);
-
-int
-evdev_is_fountain(unsigned short *id);
-
-int
-evdev_is_geyser(unsigned short *id);
-
-#else
-
-int
-evdev_is_geyser3(unsigned short *id);
-
-int
-evdev_is_geyser4(unsigned short *id);
-
-int
-evdev_is_geyser4hf(unsigned short *id);
-
-int
-evdev_is_wellspring(unsigned short *id);
-
-int
-evdev_is_wellspring2(unsigned short *id);
-#endif /* __powerpc__ */
-
-
-int
evdev_init(void);
void
Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c 2008-05-17 20:37:19 UTC (rev 459)
+++ trunk/pommed/pommed.c 2008-05-18 09:56:51 UTC (rev 460)
@@ -76,7 +76,7 @@
.lcd_backlight_probe = aty128_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step_kernel,
.lcd_backlight_toggle = sysfs_backlight_toggle_kernel,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook3,3 */
@@ -84,7 +84,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook3,4 */
@@ -92,7 +92,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook3,5 */
@@ -100,7 +100,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
/* PowerBook4,* -> G3 iBooks */
@@ -110,7 +110,7 @@
.lcd_backlight_probe = nvidia_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook5,2 */
@@ -118,7 +118,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook5,3 */
@@ -126,7 +126,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook5,4 */
@@ -134,7 +134,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook5,5 */
@@ -142,7 +142,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook5,6 */
@@ -150,7 +150,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_fountain,
+ /* .evdev_identify = evdev_is_fountain, */
},
{ /* PowerBook5,7 */
@@ -158,7 +158,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_fountain,
+ /* .evdev_identify = evdev_is_fountain, */
},
{ /* PowerBook5,8 */
@@ -166,7 +166,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_geyser,
+ /* .evdev_identify = evdev_is_geyser, */
},
{ /* PowerBook5,9 */
@@ -174,7 +174,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_geyser,
+ /* .evdev_identify = evdev_is_geyser, */
},
/* G4 iBooks & 12" PowerBooks */
@@ -184,7 +184,7 @@
.lcd_backlight_probe = nvidia_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook6,2 */
@@ -192,7 +192,7 @@
.lcd_backlight_probe = nvidia_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook6,3 */
@@ -200,7 +200,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook6,4 */
@@ -208,7 +208,7 @@
.lcd_backlight_probe = nvidia_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook6,5 */
@@ -216,7 +216,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
/* Looks like PowerBook6,6 never made it to the market ? */
@@ -226,7 +226,7 @@
.lcd_backlight_probe = r9x00_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
},
{ /* PowerBook6,8 */
@@ -234,7 +234,7 @@
.lcd_backlight_probe = nvidia_sysfs_backlight_probe,
.lcd_backlight_step = sysfs_backlight_step,
.lcd_backlight_toggle = sysfs_backlight_toggle,
- .evdev_identify = evdev_is_adb,
+ /* .evdev_identify = evdev_is_adb, */
}
};
@@ -248,7 +248,7 @@
.lcd_backlight_probe = x1600_backlight_probe,
.lcd_backlight_step = x1600_backlight_step,
.lcd_backlight_toggle = x1600_backlight_toggle,
- .evdev_identify = evdev_is_geyser3,
+ /* .evdev_identify = evdev_is_geyser3, */
},
{ /* MacBookPro2,1 / MacBookPro2,2 (Core2 Duo) */
@@ -256,7 +256,7 @@
.lcd_backlight_probe = x1600_backlight_probe,
.lcd_backlight_step = x1600_backlight_step,
.lcd_backlight_toggle = x1600_backlight_toggle,
- .evdev_identify = evdev_is_geyser4,
+ /* .evdev_identify = evdev_is_geyser4, */
},
{ /* MacBookPro3,1 (15" & 17", Core2 Duo, June 2007) */
@@ -264,7 +264,7 @@
.lcd_backlight_probe = nv8600mgt_backlight_probe,
.lcd_backlight_step = nv8600mgt_backlight_step,
.lcd_backlight_toggle = nv8600mgt_backlight_toggle,
- .evdev_identify = evdev_is_geyser4,
+ /* .evdev_identify = evdev_is_geyser4, */
},
{ /* MacBookPro4,1 (15" & 17", Core2 Duo, February 2008) */
@@ -272,7 +272,7 @@
.lcd_backlight_probe = nv8600mgt_backlight_probe,
.lcd_backlight_step = nv8600mgt_backlight_step,
.lcd_backlight_toggle = nv8600mgt_backlight_toggle,
- .evdev_identify = evdev_is_wellspring2,
+ /* .evdev_identify = evdev_is_wellspring2, */
},
/* MacBook machines */
@@ -282,7 +282,7 @@
.lcd_backlight_probe = gma950_backlight_probe,
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
- .evdev_identify = evdev_is_geyser3,
+ /* .evdev_identify = evdev_is_geyser3, */
},
{ /* MacBook2,1 (Core2 Duo) */
@@ -290,7 +290,7 @@
.lcd_backlight_probe = gma950_backlight_probe,
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
- .evdev_identify = evdev_is_geyser4,
+ /* .evdev_identify = evdev_is_geyser4, */
},
{ /* MacBook3,1 (Core2 Duo Santa Rosa, November 2007) */
@@ -298,7 +298,7 @@
.lcd_backlight_probe = gma950_backlight_probe, /* gma950 supports the gma965 */
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
- .evdev_identify = evdev_is_geyser4hf,
+ /* .evdev_identify = evdev_is_geyser4hf, */
},
{ /* MacBook4,1 (Core2 Duo, February 2008) */
@@ -306,7 +306,7 @@
.lcd_backlight_probe = gma950_backlight_probe, /* gma950 supports the gma965 */
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
- .evdev_identify = evdev_is_geyser4hf,
+ /* .evdev_identify = evdev_is_geyser4hf, */
},
/* MacBook Air machines */
@@ -316,7 +316,7 @@
.lcd_backlight_probe = gma950_backlight_probe, /* gma950 supports the gma965 */
.lcd_backlight_step = gma950_backlight_step,
.lcd_backlight_toggle = gma950_backlight_toggle,
- .evdev_identify = evdev_is_wellspring,
+ /* .evdev_identify = evdev_is_wellspring, */
}
};
#endif /* __powerpc__ */
Modified: trunk/pommed/pommed.h
===================================================================
--- trunk/pommed/pommed.h 2008-05-17 20:37:19 UTC (rev 459)
+++ trunk/pommed/pommed.h 2008-05-18 09:56:51 UTC (rev 460)
@@ -74,7 +74,6 @@
int (*lcd_backlight_probe) (void);
void (*lcd_backlight_step) (int dir);
void (*lcd_backlight_toggle) (int lvl);
- int (*evdev_identify) (unsigned short *id);
};
extern struct machine_ops *mops;
More information about the Pommed-commits
mailing list