Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hwmon: (sht15) Fix sht15_calc_temp interpolation function
I discovered two issues. First the previous sht15_calc_temp() loop did not iterate through the temppoints array since the (data->supply_uV > temppoints[i - 1].vdd) test is always true in this direction. Also the two-points linear interpolation function was returning biased values due to a stray division by 1000 which shouldn't be there. [JD: Also change the default value for d1 from 0 to something saner.] Signed-off-by: Jerome Oufella <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Cc: [email protected]
- Loading branch information