Re: [PATCH 2/4] hwmon: Add Qualcomm PMIC BCL hardware monitor driver

Manaf Meethalavalappu Pallikunhi
2026-04-17T18:08:27Z

Hi Daniel/Guenter,

On 3/20/2026 9:38 PM, Daniel Lezcano wrote:
>
> Hi Guenter,
>
> On 3/20/26 16:22, Guenter Roeck wrote:
>> On 3/20/26 07:52, Daniel Lezcano wrote:
>
> [ ... ]
>
>>>> +
>>>> +ADD_BCL_HWMON_ALARM_MAPS(in, min, lcrit);
>>>> +ADD_BCL_HWMON_ALARM_MAPS(curr, max, crit);
>>>> +
>>>> +/* Interrupt names for each alarm level */
>>>> +static const char * const bcl_int_names[ALARM_MAX] = {
>>>> +    [LVL0] = "bcl-max-min",
>>>> +    [LVL1] = "bcl-critical",
>>>> +};
>>>
>>> IIUC there are three levels of alarms but the hwmon only has max/min
>>> and critical. Would it make sense to do adaptative min / max ? So when
>>
>> hwmon has lcrit, min, max, and crit alarms for all sensor types, plus
>> an additional _cap_alarm for power attributes and _emergency_alarm
>> for temperature attributes. There is also a generic _alarm attribute
>> for each sensor, which is supposed to be used if the specific alarm
>> type is not known.
>>
>> What exactly are the three levels of alarms ?
>
> Manaf can give more clarifications, but it is like we have yellow,
> orange and red alarms. So there is an additional alarm comparing to what
> is available in hwmon. The proposed driver maps orange and red alarms,
> respectively to bcl-max and bcl-critical.

Yes, it is different limit level alarms (3 low voltage and 3 over
current) like yellow, orange and Red.
Currently I mapped, yellow and orange. Red is not enabled.

Thanks,
Manaf

>
> I'm just asking if it is important to have this 'yellow' alarm ? And as
> there is a missing alarm to describe it in hwmon, how can we use it ?