lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251104-ruddy-tuna-of-efficiency-3321d3@kuoka>
Date: Tue, 4 Nov 2025 10:51:57 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Igor Reznichenko <igor@...nichenko.net>
Cc: linux@...ck-us.net, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, corbet@....net, david.hunter.linux@...il.com, 
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org, linux-hwmon@...r.kernel.org, 
	linux-kernel@...r.kernel.org, skhan@...uxfoundation.org
Subject: Re: [PATCH v3 1/2] dt-bindings: hwmon: ST TSC1641 power monitor

On Mon, Nov 03, 2025 at 04:33:19PM -0800, 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?

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ