Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread Stephen Rothwell
Hi Dave, On Sat, 22 Mar 2008 23:31:13 + David Woodhouse <[EMAIL PROTECTED]> wrote: > > On Sun, 2008-03-23 at 10:25 +1100, Stephen Rothwell wrote: > > Why would you expect otherwise (from the C standard): > > > > "Unlike the bitwise binary & operator, the && operator guarantees > > left-to-rig

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread Andreas Schwab
David Woodhouse <[EMAIL PROTECTED]> writes: > - all = all && pm121_register_control(ct, "optical-driver-fan", FAN_OD); > - all = all && pm121_register_control(ct, "hard-driver-fan", FAN_HD); > - all = all && pm121_register_control(ct, "cpu-driver-fan", FAN_CPU); > - all = all && pm

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread David Woodhouse
On Sun, 2008-03-23 at 10:25 +1100, Stephen Rothwell wrote: > Why would you expect otherwise (from the C standard): > > "Unlike the bitwise binary & operator, the && operator guarantees > left-to-right evaluation; there is a sequence point after the evaluation > of the first operand. If the first o

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread Stephen Rothwell
On Sat, 22 Mar 2008 23:02:46 + David Woodhouse <[EMAIL PROTECTED]> wrote: > > Yeah, there's weird shit going on with the sensor/control registration. > I think GCC is be miscompiling it -- the sequence of > all = all && pm121_register_control(foo...); > all = all && pm121_register_c

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread Benjamin Herrenschmidt
On Sat, 2008-03-22 at 23:14 +, David Woodhouse wrote: > On Sat, 2008-03-22 at 23:02 +, David Woodhouse wrote: > > > > Yeah, there's weird shit going on with the sensor/control > > registration. > > I think GCC is be miscompiling it -- the sequence of > > all = all && pm121_registe

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread David Woodhouse
On Sat, 2008-03-22 at 23:02 +, David Woodhouse wrote: > > Yeah, there's weird shit going on with the sensor/control > registration. > I think GCC is be miscompiling it -- the sequence of > all = all && pm121_register_control(foo...); > all = all && pm121_register_control(bar...

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread David Woodhouse
On Sun, 2008-03-23 at 09:13 +1100, Benjamin Herrenschmidt wrote: > On Sat, 2008-03-22 at 19:35 +, David Woodhouse wrote: > > On Sat, 2008-01-26 at 12:55 +0100, Étienne Bersac wrote: > > > From: Étienne Bersac <[EMAIL PROTECTED]> > > > > > > Implement a new driver named windfarm_pm121 which dri

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread Benjamin Herrenschmidt
On Sat, 2008-03-22 at 19:35 +, David Woodhouse wrote: > On Sat, 2008-01-26 at 12:55 +0100, Étienne Bersac wrote: > > From: Étienne Bersac <[EMAIL PROTECTED]> > > > > Implement a new driver named windfarm_pm121 which drive fans on PowerMac > > 12,1 machine : iMac G5 iSight (rev C) 17" and 20".

Re: [PATCH] windfarm: add PowerMac 12,1 support

2008-03-22 Thread David Woodhouse
On Sat, 2008-01-26 at 12:55 +0100, Étienne Bersac wrote: > From: Étienne Bersac <[EMAIL PROTECTED]> > > Implement a new driver named windfarm_pm121 which drive fans on PowerMac > 12,1 machine : iMac G5 iSight (rev C) 17" and 20". It's based on > windfarm_pm81 driver from Benjamin Herrenschmidt. I

Re: [PATCH] windfarm: add PowerMac 12,1 support

2007-12-10 Thread Étienne Bersac
Hi, Appended a patch which builds without warnings due to struct declared const. Please review it. Thanks, Étienne Signed-off-by: Étienne Bersac <[EMAIL PROTECTED]> --- Implement fan control for PowerMac 12,1 machines. This needs update to windfarm_lm75 and windfarm_max6690 sensors drivers in or

Re: [PATCH] windfarm: add PowerMac 12,1 support

2007-12-10 Thread Étienne Bersac
Hi, Thanks for reviewing the patch. I fix most of your comment excepts some thing which i think are not mine. This is about the global variable. I wrote this driver willing to be as more consistent with existing windfarm_pm* drivers. All uses DBG(), global variable, etc. You'll see that i dropped

Re: [PATCH] windfarm: add PowerMac 12,1 support

2007-12-10 Thread Arnd Bergmann
On Monday 10 December 2007, Étienne Bersac wrote: > From: Étienne Bersac <[EMAIL PROTECTED]> > > Here is an updated patch that fix the potential bug, CPU param detection > failure might not be detected. Please review it. I didn't find much interesting to complain about, just a few style issues t

Re: [PATCH] windfarm: add PowerMac 12,1 support

2007-12-10 Thread Étienne Bersac
From: Étienne Bersac <[EMAIL PROTECTED]> Hi, Here is an updated patch that fix the potential bug, CPU param detection failure might not be detected. Please review it. Regards, Étienne. Signed-off-by: Étienne Bersac <[EMAIL PROTECTED]> --- Implement fan control for PowerMac 12,1 machines. This

Re: [PATCH] windfarm: add PowerMac 12,1 support

2007-12-06 Thread Étienne Bersac
Hi, > + /* First, locate the params for this model */ > + for (i = 0; i < PM121_NUM_CONFIGS; i++) { > + param = &(pm121_sys_all_params[loop_id][i]); > + if (param->model_id == pm121_mach_model) > + break; > + } > + > + /* No params found,