From: Ferdinand Schwenk via B4 Relay <devnull+ferdinand.schwenk.advastore.com@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Ferdinand Schwenk <ferdinand.schwenk@advastore.com>,
richard.leitner@linux.dev
Subject: [PATCH 0/2] hwmon: ina238: Add samples and update_interval support
Date: Fri, 22 May 2026 09:03:02 +0200 [thread overview]
Message-ID: <20260522-hwmon-ina238-add-samples-update-interval-v1-0-e1acfceb447e@advastore.com> (raw)
This series exposes the INA238 ADC_CONFIG register's averaging count
(AVG) and conversion time fields (VBUSCT, VSHCT, VTCT) through the
standard hwmon chip-level attributes chip/samples and
chip/update_interval.
The first patch adds read/write support for both attributes using a
per-chip conversion-time lookup table to correctly handle all
supported variants: INA228, INA237, INA238, INA700, INA780 (sharing
ina238_conv_time[]) and the Silergy SQ52206 (sq52206_conv_time[]).
The second patch uses microseconds as the unit for update_interval
instead of milliseconds. The INA238 supports conversion times as
short as 50 us; millisecond precision would make the four shortest
steps (50, 84, 150, 280 us) indistinguishable and inaccessible.
Since chip/update_interval is introduced in this same series, no
existing ABI is broken.
Signed-off-by: Ferdinand Schwenk <ferdinand.schwenk@advastore.com>
---
Ferdinand Schwenk (2):
hwmon: ina238: add support for samples and update_interval
hwmon: ina238: use microseconds for update_interval
drivers/hwmon/ina238.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 132 insertions(+), 2 deletions(-)
---
base-commit: 028ef9c96e96197026887c0f092424679298aae8
change-id: 20260520-hwmon-ina238-add-samples-update-interval-28761658e11f
Best regards,
--
Ferdinand Schwenk <ferdinand.schwenk@advastore.com>
next reply other threads:[~2026-05-22 7:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 7:03 Ferdinand Schwenk via B4 Relay [this message]
2026-05-22 7:03 ` [PATCH 1/2] hwmon: ina238: add support for samples and update_interval Ferdinand Schwenk via B4 Relay
2026-05-22 7:03 ` [PATCH 2/2] hwmon: ina238: use microseconds for update_interval Ferdinand Schwenk via B4 Relay
2026-05-22 13:18 ` [PATCH 0/2] hwmon: ina238: Add samples and update_interval support Guenter Roeck
2026-05-26 9:08 ` AW: " Ferdinand Schwenk
2026-05-28 4:01 ` 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=20260522-hwmon-ina238-add-samples-update-interval-v1-0-e1acfceb447e@advastore.com \
--to=devnull+ferdinand.schwenk.advastore.com@kernel.org \
--cc=ferdinand.schwenk@advastore.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=richard.leitner@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
all inboxes | Powered by JetHome®