From: Igor Reznichenko <igor@reznichenko.net>
To: krzk@kernel.org
Cc: conor+dt@kernel.org, corbet@lwn.net,
david.hunter.linux@gmail.com, devicetree@vger.kernel.org,
krzk+dt@kernel.org, linux-doc@vger.kernel.org,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@roeck-us.net, robh@kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH v3 1/2] dt-bindings: hwmon: ST TSC1641 power monitor
Date: Tue, 4 Nov 2025 08:30:48 -0800 [thread overview]
Message-ID: <20251104163048.1130482-1-igor@reznichenko.net> (raw)
In-Reply-To: <20251104-ruddy-tuna-of-efficiency-3321d3@kuoka>
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> + i2c {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + power-sensor@40 {
>> + compatible = "st,tsc1641";
>> + reg = <0x40>;
>> + interrupt-parent = <&gpio1>;
>> + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; /* Polarity board dependent */
>> + shunt-resistor-micro-ohms = <1000>;
>> + st,alert-polarity-active-high;
>
>That's wrong IMO. Either you use it as SMBus alert or as CPU interrupt.
>If you use as CPU interrupt, then the flag in "interrupts" defines what
>is the level of this interrupt. That flag is a combination of both
>CPU/SoC side and any inverters on the device. And actually you wrote it
>already - "Polarity board dependent" - so why do you:
>1. Provide polarity twice
>2. Provide inconsistent values - alert interrupt is level low, but
>alert interrupt is also active (level) high. So level low or level high?
I tried to illustrate both in one example, but I can see how this is confusing.
Will it work if I split the interrupt part into separate example?
Thanks, Igor
next prev parent reply other threads:[~2025-11-04 16:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 0:33 [PATCH v3 0/2] hwmon: Add TSC1641 I2C power monitor driver Igor Reznichenko
2025-11-04 0:33 ` [PATCH v3 1/2] dt-bindings: hwmon: ST TSC1641 power monitor Igor Reznichenko
2025-11-04 9:51 ` Krzysztof Kozlowski
2025-11-04 16:30 ` Igor Reznichenko [this message]
2025-11-05 6:56 ` Krzysztof Kozlowski
2025-11-04 0:33 ` [PATCH v3 2/2] hwmon: Add TSC1641 I2C power monitor driver Igor Reznichenko
2025-11-04 2:27 ` 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=20251104163048.1130482-1-igor@reznichenko.net \
--to=igor@reznichenko.net \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=david.hunter.linux@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
/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®