28. Mai 2020 21:22, "Andrzej Pietrasiewicz" schrieb:
> set_mode() is only called when tzd's mode is about to change. Actual
> setting is performed in thermal_core, in thermal_zone_device_set_mode().
> The meaning of set_mode() callback is actually to notify the driver about
> the mode being chang
28. Mai 2020 21:22, "Andrzej Pietrasiewicz" schrieb:
> Setting polling_delay is now done at thermal_core level (by not polling
> DISABLED devices), so no need to repeat this code.
>
> int340x: Checking for an impossible enum value is unnecessary.
> acpi/thermal: It only prints debug messages.
>
28. Mai 2020 21:22, "Andrzej Pietrasiewicz" schrieb:
> Use thermal_zone_device_{en|dis}able() and thermal_zone_device_is_enabled().
>
> Consequently, all set_mode() implementations in drivers:
>
> - can stop modifying tzd's "mode" member,
> - shall stop taking tzd's lock, as it is taken in the
28. Mai 2020 21:21, "Andrzej Pietrasiewicz" schrieb:
> get_mode() is now redundant, as the state is stored in struct
> thermal_zone_device.
>
> Consequently the "mode" attribute in sysfs can always be visible, because
> it is always possible to get the mode from struct tzd.
>
> Signed-off-by: A
28. Mai 2020 21:21, "Andrzej Pietrasiewicz" schrieb:
> Prepare for eliminating get_mode().
>
> Signed-off-by: Andrzej Pietrasiewicz
> ---
[...]
> drivers/platform/x86/acerhdf.c | 15 ++---
Acked-by: Peter Kaestle
28. Mai 2020 21:21, "Andrzej Pietrasiewicz" schrieb:
> Prepare for storing mode in struct thermal_zone_device.
>
> Signed-off-by: Andrzej Pietrasiewicz
> ---
[...]
> drivers/platform/x86/acerhdf.c | 8 --
Acked-by: Peter Kaestle
Hi,
28. Mai 2020 21:21, "Andrzej Pietrasiewicz" schrieb:
[...]
> This v4 series addresses those concerns: it takes a more gradual
> approach and uses explicit tzd state initialization, hence there are more
> insertions than in v3, and the net effect is -63 lines versus -139 lines
> in v3.
I'd