drivers/hwmon/emc1403.c | 749 +++++++++++++++++++++++++++++------------------- 1 file changed, 453 insertions(+), 296 deletions(-)
The first patch of the series converts the driver to register with the
hwmon subsystem using devm_hwmon_device_register_with_info() instead of
devm_hwmon_device_register_with_groups().
The second patch adds support for 11-bit sensor and limit register
accuracy.
The third patch adds support for update_interval attribute.
The changes were module tested with the script at
https://github.com/groeck/module-tests/blob/master/scripts/emc1403.sh
v2: Reworked first patch of the series to prepare for subsequent patches.
Added patch 2 and 3.
----------------------------------------------------------------
Guenter Roeck (3):
hwmon: (emc1403) Convert to with_info API
hwmon: (emc1403) Support 11 bit accuracy
hwmon: (emc1403) Add support for conversion interval configuration
drivers/hwmon/emc1403.c | 749 +++++++++++++++++++++++++++++-------------------
1 file changed, 453 insertions(+), 296 deletions(-)
I have tested these patches on EMC1438. This has also worked well for me. Regards, Lars Petter
On Mon, May 06, 2024 at 04:44:12PM +0200, Lars Petter Mostad wrote: > I have tested these patches on EMC1438. This has also worked well for me. > Great, thanks a lot! It would be great if you can reply to the patches with a Tested-by: tag. Also, could you send me a register dump of emc1438 ? I'd like to use a real register dump for the unit test code if possible. Thanks, Guenter
> It would be great if you can reply to the patches with a
> Tested-by: tag.
Tested-by: Lars Petter Mostad <lars.petter.mostad@appear.net>
Of course, I had to do some light modifications to the patches to be able
to test on emc1438. I will post these modifications as an RFC patch once
the above patches are available on the hwmon-next (right?) branch.
Note that checkpatch.pl --strict fails a couple of checks.
> Also, could you send me a register dump of emc1438 ?
> I'd like to use a real register dump for the unit test code if possible.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 2b 2d 00 80 06 55 00 55 00 80 06 55 00 55 00 00
10: 00 00 00 00 00 55 00 00 00 55 55 00 00 00 00 00
20: 55 0a 70 2d 00 0d 0d 00 00 80 00 00 55 00 00 00
30: 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 00 2b 60 00 00 2e c0 00 00 00 00 00 00 00 00 00
50: 55 00 00 00 55 00 00 00 55 00 00 00 55 00 00 00
60: 0e 00 00 00 55 55 55 55 00 00 00 00 00 00 00 00
70: 00 0f 0f 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 6b 60 00 00 23 00 3f 13 ad 03 20 02
b0: 20 00 00 00 20 00 20 00 00 00 00 00 12 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 59 5d 00
Regards,
Lars Petter
Hi Lars, On Tue, May 07, 2024 at 01:27:44PM +0200, Lars Petter Mostad wrote: > > It would be great if you can reply to the patches with a > > Tested-by: tag. > > Tested-by: Lars Petter Mostad <lars.petter.mostad@appear.net> > > Of course, I had to do some light modifications to the patches to be able > to test on emc1438. I will post these modifications as an RFC patch once > the above patches are available on the hwmon-next (right?) branch. > Yes. Patches are there now. > Note that checkpatch.pl --strict fails a couple of checks. > Odd; not for me. I see a couple of CHECK messages when running it on the driver. CHECK: struct mutex definition without comment CHECK: Alignment should match open parenthesis However I don't see any messages when running it on the patches. Please send me the log. > > Also, could you send me a register dump of emc1438 ? > > I'd like to use a real register dump for the unit test code if possible. > > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: 2b 2d 00 80 06 55 00 55 00 80 06 55 00 55 00 00 > 10: 00 00 00 00 00 55 00 00 00 55 55 00 00 00 00 00 > 20: 55 0a 70 2d 00 0d 0d 00 00 80 00 00 55 00 00 00 > 30: 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 40: 00 2b 60 00 00 2e c0 00 00 00 00 00 00 00 00 00 > 50: 55 00 00 00 55 00 00 00 55 00 00 00 55 00 00 00 > 60: 0e 00 00 00 55 55 55 55 00 00 00 00 00 00 00 00 > 70: 00 0f 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 > 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > a0: 00 00 00 00 6b 60 00 00 23 00 3f 13 ad 03 20 02 > b0: 20 00 00 00 20 00 20 00 00 00 00 00 12 00 00 00 > c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 59 5d 00 > Great, thanks! Guenter
© 2016 - 2026 Red Hat, Inc.