mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: ferdinand.schwenk@advastore.com
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	richard.leitner@linux.dev
Subject: Re: [PATCH 0/2] hwmon: ina238: Add samples and update_interval support
Date: Fri, 22 May 2026 06:18:43 -0700	[thread overview]
Message-ID: <7af1292b-e61a-4cbc-8353-dcbc6dfce3b6@roeck-us.net> (raw)
In-Reply-To: <20260522-hwmon-ina238-add-samples-update-interval-v1-0-e1acfceb447e@advastore.com>

On 5/22/26 00:03, Ferdinand Schwenk via B4 Relay wrote:
> 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.
> 

Are you serious ? The hwmon ABI says clearly that the unit is milliseconds.

What:           /sys/class/hwmon/hwmonX/update_interval
Description:
                 The interval at which the chip will update readings.
                 Unit: millisecond

It doesn't matter if attribute support is introduced with the series
or not. It is still an ABI violation.

Guenter


  parent reply	other threads:[~2026-05-22 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  7:03 Ferdinand Schwenk via B4 Relay
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 ` Guenter Roeck [this message]
2026-05-26  9:08   ` AW: [PATCH 0/2] hwmon: ina238: Add samples and update_interval support 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=7af1292b-e61a-4cbc-8353-dcbc6dfce3b6@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ferdinand.schwenk@advastore.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®