From: sashiko-bot@kernel.org
To: "Ferdinand Schwenk via B4 Relay"
<devnull+ferdinand.schwenk.advastore.com@kernel.org>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 1/3] hwmon: ina238: add support for samples and update_interval
Date: Tue, 09 Jun 2026 19:50:31 +0000 [thread overview]
Message-ID: <20260609195032.13C241F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260609-hwmon-ina238-update-interval-us-v2-v3-1-016b55567950@advastore.com>
> From: Ferdinand Schwenk <ferdinand.schwenk@advastore.com>
>
> Expose INA238 ADC averaging count (AVG) and conversion timing
> (VBUSCT/VSHCT/VTCT) through chip-level hwmon attributes:
>
> chip/samples
> chip/update_interval
>
> Use per-chip conversion-time lookup tables so the same helpers work
> for INA228/INA237/INA238/INA700/INA780 and SQ52206. Cache ADC_CONFIG
> in driver data and update it on writes to avoid extra register reads
> during read-modify-write updates.
>
> Report update_interval in milliseconds as required by the hwmon ABI.
> Compute it from raw ADC cycle time multiplied by the active averaging
> count, and apply the inverse mapping on writes so programmed conversion
> time tracks the selected sample count.
>
> Clamp user-provided update_interval before unit scaling to prevent
> overflow in arithmetic conversions.
>
> Also combine chip attributes in HWMON_CHANNEL_INFO using a bitwise OR
> for a single logical chip channel.
>
> Signed-off-by: Ferdinand Schwenk <ferdinand.schwenk@advastore.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-hwmon-ina238-update-interval-us-v2-v3-0-016b55567950@advastore.com?part=1
next prev parent reply other threads:[~2026-06-09 19:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 19:43 [PATCH v3 0/3] hwmon: ina238: add samples and update_interval_us support Ferdinand Schwenk via B4 Relay
2026-06-09 19:43 ` Ferdinand Schwenk
2026-06-09 19:43 ` [PATCH v3 1/3] hwmon: ina238: add support for samples and update_interval Ferdinand Schwenk via B4 Relay
2026-06-09 19:43 ` Ferdinand Schwenk
2026-06-09 19:50 ` sashiko-bot [this message]
2026-06-09 20:44 ` Guenter Roeck
2026-06-09 19:43 ` [PATCH v3 2/3] hwmon: Add update_interval_us chip attribute Ferdinand Schwenk via B4 Relay
2026-06-09 19:43 ` Ferdinand Schwenk
2026-06-09 19:48 ` sashiko-bot
2026-06-09 20:45 ` Guenter Roeck
2026-06-09 19:43 ` [PATCH v3 3/3] hwmon: ina238: add update_interval_us attribute Ferdinand Schwenk via B4 Relay
2026-06-09 19:43 ` Ferdinand Schwenk
2026-06-09 19:49 ` sashiko-bot
2026-06-09 20:49 ` 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=20260609195032.13C241F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+ferdinand.schwenk.advastore.com@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.