Skip to content

Commit

Permalink
hwmon: (lm90) Support multiple temperature resolutions
Browse files Browse the repository at this point in the history
While most LM90 compatible chips support a temperature sensor resolution
of 11 bit, this is not the case for all chips. ADT7461 only supports a
resolution of 10 bit, and TMP451/TMP461 support a resolution of 12 bit.

Add support for various temperature sensor resolutions. To do this,
model all temperature sensors as 16 bit sensors, and use unified
temperature conversion functions which take the sensor resolution
as parameter.

While enhancing functionality, this has the positive side effect of
reducing code size by about 5%.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Jul 13, 2022
1 parent 8f19501 commit a8ddcc5
Showing 1 changed file with 155 additions and 297 deletions.
Loading

0 comments on commit a8ddcc5

Please sign in to comment.