On Sat, Jan 6, 2024 at 8:16 PM Manaf Meethalavalappu PallikunhiI think it is regression after recent re-work. If a sensor is registered witht thermal framework via thermal_of, sensor driver doesn't need to know the trip configuration and nothing to do with set_trip_hyst() in driver. Without this change, if a sensor needs to be monitored from userspace(trip/hysteresis), it is enforcing sensor driver to add dummy set_trip_hyst() operation. Correct me otherwise.
<quic_manafm@xxxxxxxxxxx> wrote:
The commit 2e38a2a981b2("thermal/core: Add a generic
thermal_zone_set_trip() function") adds the support to update
trip hysteresis even if set_trip_hyst() operation is not defined.
But during hysteresis attribute creation, if this operation is
defined then only it enables hysteresis write access. It leads
to a case where hysteresis sysfs will be read only for a thermal
zone when its set_trip_hyst() operation is not defined.
Which is by design.
For some thermal zone types (eg. acpi), updating trip hysteresis via
sysfs might lead to incorrect behavior.