From: Guenter Roeck <linux@roeck-us.net>
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,
robh@kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH 1/5] drivers/hwmon: Add TSC1641 I2C power monitor driver
Date: Thu, 23 Oct 2025 05:55:17 -0700 [thread overview]
Message-ID: <cea96330-5d7a-4fdc-8fc6-0067769a0b2c@roeck-us.net> (raw)
In-Reply-To: <20251023075050.254998-1-igor@reznichenko.net>
On Thu, Oct 23, 2025 at 12:50:50AM -0700, Igor Reznichenko wrote:
> Guenter,
> Thanks for the detailed feedback. I will address it.
>
> > Please send a register dump.
>
> Here's register dump after init during run:
>
> tsc1641 1-0040: 0x00: 0x003f
> tsc1641 1-0040: 0x01: 0x0253
> tsc1641 1-0040: 0x02: 0x0dc0
> tsc1641 1-0040: 0x03: 0x0053
> tsc1641 1-0040: 0x04: 0x0250
> tsc1641 1-0040: 0x05: 0x0033
> tsc1641 1-0040: 0x06: 0x0000
> tsc1641 1-0040: 0x07: 0x0000
> tsc1641 1-0040: 0x08: 0x01f4
> tsc1641 1-0040: 0x09: 0x0000
> tsc1641 1-0040: 0x0a: 0x0000
> tsc1641 1-0040: 0x0b: 0x0000
> tsc1641 1-0040: 0x0c: 0x0000
> tsc1641 1-0040: 0x0d: 0x0000
> tsc1641 1-0040: 0x0e: 0x0000
> tsc1641 1-0040: 0xfe: 0x0006
> tsc1641 1-0040: 0xff: 0x1000
>
Great, thanks a lot!
> > > +
> > > + /*
> > > + * Disable alert mask first, then write the value and enable alert mask
> > Why ?
>
> The idea was to prevent potential previous alert from propagating when changing
> the value, plus to only enable alert when crit/lcrit value is non-zero.
> But given your response below this is not the right thing to do.
>
> > Disabling alerts if the limit is 0 is wrong: The limit can be set
> > to 0 on purpose. Only unmasking the limit if a limit is set is just as wrong.
> > Either limits are enabled and reported, or they are disabled and the attributes
> > must not be generated. Mis-using the ABI to declare "If the limit value is
> > 0, mask the limit. Otherwise set the limit and unmask it" is unacceptable.
>
> Thanks for clarification. So would you recommend then that all alerts should
> be always on/unmasked for this chip or to add custom sysfs attributes to control
> them, since it has this capability?
>
Almost every chip has that capability. That does not warrant a custom sysfs
attribute. I'd suggest to just enable them all.
Guenter
next prev parent reply other threads:[~2025-10-23 12:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 4:47 [PATCH 0/5] hwmon: Add TSC1641 I2C power monitor driver Igor Reznichenko
2025-10-22 4:47 ` [PATCH 1/5] drivers/hwmon: " Igor Reznichenko
2025-10-22 14:51 ` Guenter Roeck
2025-10-23 7:50 ` Igor Reznichenko
2025-10-23 12:55 ` Guenter Roeck [this message]
2025-10-22 4:47 ` [PATCH 2/5] drivers/hwmon: Add Kconfig entry for TSC1641 Igor Reznichenko
2025-10-22 6:49 ` Krzysztof Kozlowski
2025-10-22 4:47 ` [PATCH 3/5] drivers/hwmon: Add TSC1641 module to Makefile Igor Reznichenko
2025-10-22 6:49 ` Krzysztof Kozlowski
2025-10-22 4:47 ` [PATCH 4/5] Documentation/hwmon: Add TSC1641 driver documentation Igor Reznichenko
2025-10-22 4:47 ` [PATCH 5/5] Documentation/devicetree/bindings/hwmon: Add TSC1641 binding Igor Reznichenko
2025-10-22 6:29 ` Rob Herring (Arm)
2025-10-22 6:48 ` Krzysztof Kozlowski
2025-10-22 14:07 ` [PATCH 0/5] hwmon: Add TSC1641 I2C power monitor driver Guenter Roeck
2025-10-26 6:50 ` [PATCH v2 0/2] " Igor Reznichenko
2025-10-26 6:50 ` [PATCH v2 1/2] dt-bindings: hwmon: Add support for ST TSC1641 power monitor Igor Reznichenko
2025-10-26 16:32 ` Krzysztof Kozlowski
2025-10-26 17:22 ` Guenter Roeck
2025-10-26 19:15 ` Krzysztof Kozlowski
2025-10-26 18:46 ` Igor Reznichenko
2025-10-26 19:41 ` Krzysztof Kozlowski
2025-10-26 19:58 ` Guenter Roeck
2025-10-27 8:40 ` Krzysztof Kozlowski
2025-10-27 16:53 ` Guenter Roeck
2025-10-27 18:01 ` Krzysztof Kozlowski
2025-10-27 19:14 ` Rob Herring
2025-10-28 15:17 ` Igor Reznichenko
2025-10-28 15:33 ` Guenter Roeck
2025-10-31 4:40 ` Igor Reznichenko
2025-10-31 7:57 ` Krzysztof Kozlowski
2025-10-31 17:30 ` Igor Reznichenko
2025-10-31 18:37 ` Guenter Roeck
2025-10-26 6:50 ` [PATCH v2 2/2] hwmon: Add TSC1641 I2C power monitor driver Igor Reznichenko
2025-10-26 17:08 ` Guenter Roeck
2025-10-27 6:41 ` Igor Reznichenko
2025-10-27 16:52 ` Guenter Roeck
2025-10-26 16:28 ` [PATCH v2 0/2] " Krzysztof Kozlowski
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=cea96330-5d7a-4fdc-8fc6-0067769a0b2c@roeck-us.net \
--to=linux@roeck-us.net \
--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=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