Re: [PATCH v2 5/8] dt-bindings: power: supply: max77658: Add ADI MAX77658 Battery

From: Krzysztof Kozlowski
Date: Tue May 02 2023 - 13:13:56 EST


On 02/05/2023 17:05, Arslanbenzer, Zeynep wrote:
> On Tue, 2 May 2023, Krzysztof Kozlowski wrote:
>> On 01/05/2023 22:20, Arslanbenzer, Zeynep wrote:
>>
>>>> You already said it above.
>>>>
>>>>> + in battery.yaml, with the following properties being required:
>>>>> + - alert-celsius
>>>>> +
>>>>> +required:
>>>>> + - compatible
>>>>
>>>> Why reg and monitored-batter are not required?
>>>>
>>> If no monitored-battery information is supplied, we set default values for alert-celsius.
>>
>> So the device can operate without battery? Interesting... are you sure, you can physically remove battery and device will work?
>>
>
> I mean if battery info is not supplied, we use default values.
>
> ret = power_supply_get_battery_info(fg->battery, &info);
> if (ret) {
> dev_err(fg->dev, "Unable to get battery info\n");
> fg->temp_alert_min = info->temp_alert_min;
> fg->temp_alert_max = info->temp_alert_max;
> } else {
> fg->temp_alert_min = -128;
> fg->temp_alert_max = 127;
> }

You speak about driver, but I speak about hardware. The bindings are for
the latter.

Best regards,
Krzysztof