[PATCH 2.6] I2C: Store lm83 and lm90 temperatures in signed variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 26, 2004 at 11:31:51AM +0200, Jean Delvare wrote:
> Hi Greg,
> 
> Back when I wrote the lm83 and lm90 drivers, I decided to use unsigned
> variables to store temperature values as mirrored from the chipset
> registers. I wonder why, since the registers use signed values
> themselves. The patch below changes the variables back to signed types,
> so as to simplify the conversions made by the driver, making them faster
> and easier to understand.
> 
> Additionally, the lm90 driver was lacking boundary checkings and proper
> rounding when writing temperature limits to the chipset, so I added
> these. I also reworded the comments about internal temperature values
> representation for all chipsets.
> 
> Tested to work fine on my (LM90-compatible) ADM1032 chip. lm83 patch
> untested, but it is more simple and directly copied from the lm90, so I
> am confident it works fine too.
> 
> Please apply,

Applied, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux