| From: |
| Slawomir Stepien <sst-AT-poczta.fm> |
| To: |
| linux-hwmon-AT-vger.kernel.org, devicetree-AT-vger.kernel.org |
| Subject: |
| [PATCH 0/8] Add support for ADT7481 in lm90 |
| Date: |
| Fri, 20 May 2022 11:32:36 +0200 |
| Message-ID: |
| <20220520093243.2523749-1-sst@poczta.fm> |
| Cc: |
| jdelvare-AT-suse.com, linux-AT-roeck-us.net, robh+dt-AT-kernel.org, krzysztof.kozlowski+dt-AT-linaro.org, przemyslaw.cencner-AT-nokia.com, krzysztof.adamski-AT-nokia.com, alexander.sverdlin-AT-nokia.com |
| Archive-link: |
| Article |
From: Slawomir Stepien <slawomir.stepien@nokia.com>
This patch series adds support for ADT7481 in lm90.c driver and extends the
device-tree options for it.
The ADT7481 is quite similar to MAX6696 (already supported in lm90) so a lot of
code is reused.
One major problem in fitting the ADT7481 in lm90.c is the chip detection.
However it seems that the chip has been designed and produced with correct
values at locations: 0xfe (manufactured id) and 0xff (chip id), but this is not
documented in the datasheet.
$ i2cdump -y -f -r 254-255 1 0x4c
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
f0: 41 62 Ab
The device-tree changes allow to: set the extended temperature range mode and
set the label and offset for specific channel.
Note: previous "attempts" for adding ADT7481 in lm90 where here: [1][2].
[1] https://www.spinics.net/lists/lm-sensors/msg25066.html
[2] https://marc.info/?l=lm-sensors&m=137786448326215&...
Slawomir Stepien (8):
dt-bindings: hwmon: Add support for ADT7481 in lm90
dt-bindings: hwmon: Add 'extended-range-enable' property support in lm90
dt-bindings: hwmon: Allow specifying channels for lm90
hwmon: (lm90) add support for ADT7481
hwmon: (lm90) define maximum number of channels that are supported
hwmon: (lm90) enable the extended temperature range
hwmon: (lm90) read the channel's label from device-tree
hwmon: (lm90) read the channel's offset from device-tree
.../devicetree/bindings/hwmon/national,lm90.yaml | 42 ++++
Documentation/hwmon/lm90.rst | 12 +-
drivers/hwmon/Kconfig | 15 +-
drivers/hwmon/lm90.c | 251 ++++++++++++++++++++----
4 files changed, 271 insertions(+), 49 deletions(-)