mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Igor Reznichenko <igor@reznichenko.net>
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: Wed, 5 Nov 2025 07:56:32 +0100	[thread overview]
Message-ID: <7376d6a7-9e12-41ae-85ce-957294f140f6@kernel.org> (raw)
In-Reply-To: <20251104163048.1130482-1-igor@reznichenko.net>

On 04/11/2025 17:30, Igor Reznichenko wrote:
>>> +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?
>

No need for another example, just drop the interrupts here.

Best regards,
Krzysztof

  reply	other threads:[~2025-11-05  6:56 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
2025-11-05  6:56       ` Krzysztof Kozlowski [this message]
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=7376d6a7-9e12-41ae-85ce-957294f140f6@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=david.hunter.linux@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=igor@reznichenko.net \
    --cc=krzk+dt@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®