Devicetree
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Manaf Meethalavalappu Pallikunhi
	<manaf.pallikunhi@oss.qualcomm.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-hwmon@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	mfd@lists.linux.dev, Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
Subject: Re: [PATCH v2 02/10] hwmon: Add Qualcomm PMIC BCL driver
Date: Thu, 30 Jul 2026 13:48:02 +0200	[thread overview]
Message-ID: <5861906e-2969-4849-b9ec-ff6c7df65dad@oss.qualcomm.com> (raw)
In-Reply-To: <df2f8d63-4972-4b59-883f-0a919e7cb409@roeck-us.net>

On 7/24/26 02:04, Guenter Roeck wrote:
> On 7/23/26 12:16, Manaf Meethalavalappu Pallikunhi wrote:
>> Hi Guenter,
>>
>> On 7/23/2026 12:29 AM, Guenter Roeck wrote:
>>> On 7/22/26 11:19, Manaf Meethalavalappu Pallikunhi wrote:
>>>> Hi Guenter,
>>>>
>>>> On 7/22/2026 11:16 PM, Guenter Roeck wrote:
>>>>> On 7/22/26 10:38, Manaf Meethalavalappu Pallikunhi wrote:
>>>>> ...
>>>>>>>
>>>>>>> I am curious: Why not use static initialization and use the 
>>>>>>> is_visible
>>>>>>> function to determine if an attribute is visible or not ?
>>>>>>
>>>>>> ACK. There is already a comment in v1 suggesting the use of 
>>>>>> dynamic allocation based on the available attributes rather than 
>>>>>> static initialization. The intent is to avoid having to perform 
>>>>>> enable flag checks in multiple places.
>>>>>> . >
>>>>>
>>>>> You lost me, sorry. There is only a single is_visible function,
>>>>> and its intent is exactly to handle situations where some sensors
>>>>> are not always available.
>>>>>
>>>>> What would be those "multiple places" ?
>>>>
>>>> Understood, thanks for the clarification. I'll revert to static 
>>>> attribute initialization in the next revision and use is_visible() 
>>>> to control attribute visibility where needed.
>>>>
>>>>>
>>>>>>>  From the earlier exchange I had the impression that there is a 
>>>>>>> large
>>>>>>> number of current and voltage channels, but it looks like there 
>>>>>>> is only
>>>>>>> one each. That doesn't really warrant or need all this dynamic code
>>>>>>
>>>>>> Yes, this hardware only supports one or two channels (voltage and 
>>>>>> current). What we discussed earlier was that each channel can have 
>>>>>> up to three threshold alarms (warning, critical, and emergency). 
>>>>>> However, the hwmon framework currently supports only two limit 
>>>>>> alarms for these sensor types. I have not added support for the 
>>>>>> third alarm threshold in this series to keep the initial driver 
>>>>>> support aligned with the existing hwmon capabilities. Once the 
>>>>>> basic driver support is accepted, I can queue a follow-up series 
>>>>>> to add support for the third limit alarm.
>>>>>>
>>>>>
>>>>> What does that have to do with attribute visibility ?
>>>>
>>>> I was only clarifying that the channel count has always been small 
>>>> (maximum of two channels) and has not changed since v1. The earlier 
>>>> discussion was primarily around the limit alarm attributes. That 
>>>> said, you're right that this is unrelated to attribute visibility.
>>>>
>>>
>>> Feel free to use (and test)
>>> https://lore.kernel.org/linux-hwmon/20260722185749.2313572-1- 
>>> linux@roeck-us.net/T/#u
>>
>> Thanks for working on this. I'll use that change as the base, rebase 
>> my series on top of it, and add support for the third alarm level.
>> By the way, for the voltage channel, the hardware monitors 
>> undervoltage conditions and provides three threshold levels. At the 
>> moment, I am mapping:
>>
>> LVL0 → min
>> LVL1 → lcrit
>>
>> For LVL2, would it be possible to introduce a corresponding low- 
>> voltage emergency threshold, such as lemergency (or another more 
>> appropriate name), to represent the third alarm level for voltage 
>> sensors ?
>>
> 
> We can, but I really have no idea how to name it. lcrit is bad enough,
> but lemergency is even worse (or at least I think so). "lemerg" would
> be almost as bad, but at least it would kind of match "lcrit".
> I tried to ask Google AI, but it didn't give me any useful ideas.
> Any other suggestions or ideas ?

'lfatal' ?



  reply	other threads:[~2026-07-30 11:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 18:30 [PATCH v2 00/10] hwmon: Add Qualcomm SPMI BCL driver Manaf Meethalavalappu Pallikunhi
2026-07-21 18:30 ` [PATCH v2 01/10] dt-bindings: hwmon: Describe Qualcomm BCL hardware Manaf Meethalavalappu Pallikunhi
2026-07-21 18:36   ` sashiko-bot
2026-07-23  8:11   ` Krzysztof Kozlowski
2026-07-30 11:35     ` Daniel Lezcano
2026-07-30 15:19       ` Manaf Meethalavalappu Pallikunhi
2026-07-21 18:30 ` [PATCH v2 02/10] hwmon: Add Qualcomm PMIC BCL driver Manaf Meethalavalappu Pallikunhi
2026-07-21 19:20   ` sashiko-bot
2026-07-21 20:44   ` Guenter Roeck
2026-07-22 17:38     ` Manaf Meethalavalappu Pallikunhi
2026-07-22 17:46       ` Guenter Roeck
2026-07-22 18:19         ` Manaf Meethalavalappu Pallikunhi
2026-07-22 18:59           ` Guenter Roeck
2026-07-23 19:16             ` Manaf Meethalavalappu Pallikunhi
2026-07-24  0:04               ` Guenter Roeck
2026-07-30 11:48                 ` Daniel Lezcano [this message]
2026-07-30 15:17                   ` Guenter Roeck
2026-08-13 19:27                     ` Manaf Meethalavalappu Pallikunhi
2026-08-13 19:54                       ` Guenter Roeck
2026-07-23  6:29   ` Uwe Kleine-König
2026-07-23  7:40     ` Manaf Meethalavalappu Pallikunhi
2026-07-21 18:30 ` [PATCH v2 03/10] arm64: dts: qcom: pm7250b: Enable BCL sensor node Manaf Meethalavalappu Pallikunhi
2026-07-21 19:13   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 04/10] arm64: dts: qcom: hamoa-pmic: " Manaf Meethalavalappu Pallikunhi
2026-07-21 18:37   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 05/10] arm64: dts: qcom: pm8350c: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:14   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 06/10] arm64: dts: qcom: pmh0101: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:17   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 07/10] arm64: dts: qcom: pm8550: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:14   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 08/10] arm64: dts: qcom: pmih0108-kaanapali: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:17   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 09/10] arm64: dts: qcom: pmih0108: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:16   ` sashiko-bot
2026-07-21 18:30 ` [PATCH v2 10/10] arm64: dts: qcom: smb2370: " Manaf Meethalavalappu Pallikunhi
2026-07-21 19:17   ` sashiko-bot

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=5861906e-2969-4849-b9ec-ff6c7df65dad@oss.qualcomm.com \
    --to=daniel.lezcano@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gaurav.kohli@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=manaf.pallikunhi@oss.qualcomm.com \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.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