From: sashiko-bot@kernel.org
To: "Davíð Steinn Geirsson" <david@dsg.is>, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 2/4] hwmon: (adt7475) Convert to hwmon_device_register_with_info()
Date: Sat, 14 Nov 2026 00:56:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-213958@kernel.org> (raw)
In-Reply-To: <20261114004110.328050-3-david@dsg.is>
> Convert the driver from hwmon_device_register_with_groups() to
> hwmon_device_register_with_info(). The standard voltage, temperature,
> fan and PWM attributes move to hwmon_ops. The chip-specific attributes
> stay driver-defined and are passed as extra groups: the automatic fan
> control points, temperature smoothing, PWM stall disable,
> pwm_use_point2_pwm_at_crit and the VID attributes.
>
> The driver keeps data->lock, although the hwmon core serialises the
> hwmon_ops callbacks. The attributes in the extra groups run outside that
> serialisation, and they share the register cache and its periodic update
> with the hwmon_ops callbacks. They do not take hwmon_lock() instead, to
> keep this conversion free of locking changes.
>
> The sysfs attribute names, permissions, values and register writes are
> unchanged. This was checked with i2c-stub on all four chip types and
> several register images, comparing the attribute list, every value read
> and written, and the final register contents before and after the
> conversion.
>
> The hwmon core parses the standard attributes with kstrtol() and
> returns its error, which gives two differences for input that is out of
> range:
> - Writing a number that does not fit in a long now fails with -ERANGE
> instead of -EINVAL.
> - fanN_min was parsed with kstrtoul(), so values above LONG_MAX were
> accepted (and set the lowest limit). They now fail with -ERANGE. On
> 32-bit systems this applies from 2147483648 rpm, far beyond any real
> fan.
>
> Signed-off-by: Davíð Steinn Geirsson <david@dsg.is>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261114004110.328050-1-david@dsg.is?part=2
next prev parent reply other threads:[~2026-11-14 0:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 0:41 [PATCH 0/4] hwmon: (adt7475) Add thermal sensor and PWM provider support Davíð Steinn Geirsson
2026-11-14 0:41 ` [PATCH 1/4] dt-bindings: hwmon: adt7475: Add #thermal-sensor-cells Davíð Steinn Geirsson
2026-11-14 0:49 ` sashiko-bot
2026-11-14 0:41 ` [PATCH 2/4] hwmon: (adt7475) Convert to hwmon_device_register_with_info() Davíð Steinn Geirsson
2026-11-14 0:56 ` sashiko-bot [this message]
2026-11-14 0:41 ` [PATCH 3/4] hwmon: (adt7475) Add thermal zone sensor support Davíð Steinn Geirsson
2026-11-14 0:46 ` sashiko-bot
2026-11-14 0:41 ` [PATCH 4/4] hwmon: (adt7475) Expose fan control via PWM framework Davíð Steinn Geirsson
2026-11-14 0:51 ` sashiko-bot
2026-11-14 1:03 ` [PATCH 0/4] hwmon: (adt7475) Add thermal sensor and PWM provider support Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-213958@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=david@dsg.is \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox