[lm-sensors] [PATCH 1/3] hwmon: (lm90) Simplify handling of extended local temp register
Stijn Devriendt (sdevrien)
sdevrien at cisco.com
Tue Jul 26 17:32:07 CEST 2011
> -----Original Message-----
> From: Jean Delvare [mailto:khali at linux-fr.org]
> Sent: zondag 24 juli 2011 20:35
> To: LM Sensors
> Cc: Stijn Devriendt (sdevrien); Guenter Roeck
> Subject: [PATCH 1/3] hwmon: (lm90) Simplify handling of extended local
> temp register
> The optional extended local temperature register can never have
> address 0, as this address is already used by another register. Thus
> we can get rid of flag LM90_HAVE_LOCAL_EXT and simply rely on
> reg_local_ext being non-zero to determine if a given chip has this
> extension or not. This makes the code more simple.
> Signed-off-by: Jean Delvare <khali at linux-fr.org>
> Cc: Stijn Devriendt <sdevrien at cisco.com>
> Cc: Guenter Roeck <guenter.roeck at ericsson.com>
> * This patch fixes a bug as a side effect: chip type max6657 lacked
> the definition of reg_local_ext. I can submit a separate patch for
> this, or it can be fixed in the patch which broke it (as it isn't in
> Linus' tree yet) and I'll adjust this one accordingly, or this patch
> can be merged in the patch which broke it altogether. All options
> are fine with me. Guenter?
It was probably introduced by forward porting the original code from
where the max6657 wasn't supported yet.
I'd prefer merging the 2 together or fixing the original one as that
leave a window where the driver is broken for that particular chip.
More information about the lm-sensors