Setting w83627hf fan divisor 128 fails.

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

 



check in
thanks

Jarkko Lavinen wrote:
> Hi all
> 
> I couldn't set the divisor 128 through fan1_div sysfs entry even though the 
> chip supports it and setting divisors 1..64 worked. This was due to 
> POWER_TO_REG() only checking 2's powers 0 till 5 but not 6.
> 
> Regards
> Jarkko Lavinen
> 
> --- linux-2.6.12-rc3/drivers/i2c/chips/w83627hf.c       2005-04-21 03:03:13.000000000 +0300
> +++ linux-2.6.12-rc3-koe/drivers/i2c/chips/w83627hf.c   2005-05-08 20:04:04.000000000 +0300
> @@ -264,7 +264,7 @@ static inline u8 DIV_TO_REG(long val)
>  {
>         int i;
>         val = SENSORS_LIMIT(val, 1, 128) >> 1;
> -       for (i = 0; i < 6; i++) {
> +       for (i = 0; i < 7; i++) {
>                 if (val == 0)
>                         break;
>                 val >>= 1;
> 




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

  Powered by Linux