[PATCH 2.6.22] PMU LED whitelisting of PowerMac 7,2 and 7,3

Tony Vroon chainsaw at gentoo.org
Fri Mar 23 10:31:08 EST 2007


Redone with strcmp as requested by Paul Mackerras.
The necessary IDE-trigger functionality in the libata core has been ack'ed 
by Tejun Heo and will be in the next -mm release.

This allows the PMU LED on both a PowerMac 7,2 (Dual G5 2.0GHz, June 2003) 
and a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) to be controlled.
The physical LED is never off, unlike an iBook/PowerBook LED.
It is rather dim ("off") or very bright ("on").

Signed-off-by: Tony Vroon <chainsaw at gentoo.org>

--- linux-2.6/drivers/macintosh/via-pmu-led.c.orig	2007-03-22 20:16:54.000000000 +0000
+++ linux-2.6/drivers/macintosh/via-pmu-led.c	2007-03-22 20:18:26.000000000 +0000
@@ -124,7 +124,9 @@
 	if (model == NULL)
 		return -ENODEV;
 	if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
-	    strncmp(model, "iBook", strlen("iBook")) != 0) {
+	    strncmp(model, "iBook", strlen("iBook")) != 0 &&
+	    strcmp(model, "PowerMac7,2") != 0 &&
+	    strcmp(model, "PowerMac7,3") != 0) {
 		of_node_put(dt);
 		/* ignore */
 		return -ENODEV;



More information about the Linuxppc-dev mailing list