[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50cb21bc-55e7-4bf3-9d05-0cbe10af46aa@roeck-us.net>
Date: Wed, 12 Nov 2025 18:03:01 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Wenliang Yan <wenliang202407@....com>, Jean Delvare <jdelvare@...e.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: christophe.jaillet@...adoo.fr, corbet@....net,
devicetree@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] dt-binding:ti,ina3221:Add SQ52210
On 11/11/25 00:05, Wenliang Yan wrote:
> Add a compatible string for sq52210, sq52210 is forward compatible
> with INA3221 and add alert register to implement four additional
> alert function.
>
> Signed-off-by: Wenliang Yan <wenliang202407@....com>
> ---
> .../devicetree/bindings/hwmon/ti,ina3221.yaml | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml
> index 5f10f1207d69..0fae82ca3ee1 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml
> @@ -12,7 +12,9 @@ maintainers:
>
> properties:
> compatible:
> - const: ti,ina3221
> + enum:
> + - silergy,sq52210
> + - ti,ina3221
>
> reg:
> maxItems: 1
> @@ -77,6 +79,18 @@ patternProperties:
> exclude specific channels from the summation control function.
> type: boolean
>
> + alert-type:
> + description: |
> + The SQ52210 features a configurable alert function with four
> + types: SUL, BOL, BUL, and POL. Each channel can be configured to
> + select one of these types to enable the alert function. This alert
> + function can operate concurrently with both Critical and Warning
> + functions.
> +
> + The configuration must use numerical values 0 through 3,
> + 0 corresponds to SUL, 1 to BOL, 2 to BUL, and 3 to POL.
> + enum: [ 0, 1, 2, 3 ]
> +
Per datasheet, each of the alerts can be enabled independently. It is possible
to enable SUL, BOL, BUL, and POL on each channel at the same time. This is not
possible with the above property since it only permits enabling alerts for one
of the alert sources on each channel.
Also, I am not sure if it makes sense to have this as devicetree property.
It is not really a board property. It might make more sense to tie enabling
the alerts automatically if a channel is enabled and a limit is set for a
given channel.
Guenter
Powered by blists - more mailing lists