* [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3
@ 2007-03-18 20:11 Tony Vroon
2007-03-22 11:48 ` Paul Mackerras
2007-04-05 12:45 ` William Pitcock
0 siblings, 2 replies; 4+ messages in thread
From: Tony Vroon @ 2007-03-18 20:11 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
The previous patch was not the correct file and would not have compiled. Apologies.
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").
A patch to add a LED trigger to the libata core has been sent to Jeff Garzik.
Signed-off-by: Tony Vroon <chainsaw@gentoo.org>
--- linux-2.6/drivers/macintosh/via-pmu-led.c.orig 2007-03-09 22:38:31.000000000 +0000
+++ linux-2.6/drivers/macintosh/via-pmu-led.c 2007-03-18 19:46:27.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 &&
+ strncmp(model, "PowerMac7,2", strlen("PowerMac7,2")) != 0 &&
+ strncmp(model, "PowerMac7,3", strlen("PowerMac7,3")) != 0) {
of_node_put(dt);
/* ignore */
return -ENODEV;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3
2007-03-18 20:11 [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3 Tony Vroon
@ 2007-03-22 11:48 ` Paul Mackerras
2007-04-05 12:45 ` William Pitcock
1 sibling, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2007-03-22 11:48 UTC (permalink / raw)
To: Tony Vroon; +Cc: linuxppc-dev
Tony Vroon writes:
> if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
> - strncmp(model, "iBook", strlen("iBook")) != 0) {
> + strncmp(model, "iBook", strlen("iBook")) != 0 &&
> + strncmp(model, "PowerMac7,2", strlen("PowerMac7,2")) != 0 &&
> + strncmp(model, "PowerMac7,3", strlen("PowerMac7,3")) != 0) {
Since we only want to accept "PowerMac7,2" or "PowerMac7,3", and not
any longer strings ("PowerMac7,30" for instance), I think the
comparisons you have added should use strcmp rather than strncmp.
Paul.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3
2007-03-18 20:11 [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3 Tony Vroon
2007-03-22 11:48 ` Paul Mackerras
@ 2007-04-05 12:45 ` William Pitcock
2007-04-05 19:01 ` Segher Boessenkool
1 sibling, 1 reply; 4+ messages in thread
From: William Pitcock @ 2007-04-05 12:45 UTC (permalink / raw)
To: Tony Vroon; +Cc: linuxppc-dev
Hello,
This patch also works on PowerMac3,5. It is also confirmed to work on the
iMac "Flower Power" model, but I do not have the specific model ID for
that on me at the moment.
William
On Sun, 18 Mar 2007, Tony Vroon wrote:
> The previous patch was not the correct file and would not have compiled. Apologies.
>
> 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").
> A patch to add a LED trigger to the libata core has been sent to Jeff Garzik.
>
> Signed-off-by: Tony Vroon <chainsaw@gentoo.org>
>
> --- linux-2.6/drivers/macintosh/via-pmu-led.c.orig 2007-03-09 22:38:31.000000000 +0000
> +++ linux-2.6/drivers/macintosh/via-pmu-led.c 2007-03-18 19:46:27.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 &&
> + strncmp(model, "PowerMac7,2", strlen("PowerMac7,2")) != 0 &&
> + strncmp(model, "PowerMac7,3", strlen("PowerMac7,3")) != 0) {
> of_node_put(dt);
> /* ignore */
> return -ENODEV;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-05 19:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-18 20:11 [PATCH 2.6.22] [resend] Allow PMU LED control on PowerMac 7, 2 and 7, 3 Tony Vroon
2007-03-22 11:48 ` Paul Mackerras
2007-04-05 12:45 ` William Pitcock
2007-04-05 19:01 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).