Skip to content

Stop monitoring disabled devices

Andrzej Pietrasiewicz linux-acpi linux-arm-kernel linux-pm linux-renesas-soc linux-rockchip linux-wireless netdev oe-kbuild-all platform-driver-x86 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchBartlomiej Zolnierkiewicz
SeriesR-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Stop monitoring disabled devices

After 3 revisions of an RFC I'm sending this as a PATCH series.

The first patch makes all the drivers store their mode in struct thermal_zone_device. Such a move has consequences: driver-specific variables for storing mode are not necessary. Consequently get_mode() methods become obsolete. Then sysfs "mode" attribute stops depending on get_mode() being provided, because it is always provided from now on.

The first patch also introduces the initial mode to be optionally passed to thermal_zone_device_register().

Given all the groundwork done in patch 1/2 patch 2/2 becomes very simple.

Compared to RFC v3 this series addresses comments from Bartlomiej, thank you Bartlomiej for your review!

RFCv3..this PATCH:

- export thermal_zone_device_{enable|disable}() for drivers
- don't check provided enum values in acpi's thermal_zet_mode() and in int3400_thermal_set_mode()
- use thermal_zone_device_enable() in of_thermal instead of open coding it
- use thermal_zone_device_{enable|disable}() in hisi_thermal, rockchip_thermal and sprd_thermal
- assume THERMAL_DEVICE_ENABLED is thermal_zone_params not provided at tzd's register time
- eliminated tzp-s which contain only .initial_mode = THERMAL_DEVICE_ENABLED,
- don't set tz->need_update and don't call thermal_zone_device_update() at the end of thermal_zone_device_register()
- used .initial_mode in int340x_thermal_zone, x86_pkg_temp_thermal and int3400_thermal

Andrzej Pietrasiewicz (2):
thermal: core: Let thermal zone device's mode be stored in its struct
thermal: core: Stop polling DISABLED thermal devices

 drivers/acpi/thermal.c                        | 35 ++--------
 .../ethernet/mellanox/mlxsw/core_thermal.c    | 42 ------------
 drivers/platform/x86/acerhdf.c                | 17 +----
 drivers/thermal/da9062-thermal.c              | 11 ----
 drivers/thermal/hisi_thermal.c                |  6 +-
 drivers/thermal/imx_thermal.c                 | 24 ++-----
 .../intel/int340x_thermal/int3400_thermal.c   | 31 ++-------
 .../int340x_thermal/int340x_thermal_zone.c    |  1 +
 .../thermal/intel/intel_quark_dts_thermal.c   | 22 ++-----
 drivers/thermal/intel/x86_pkg_temp_thermal.c  |  1 +
 drivers/thermal/of-thermal.c                  | 24 +------
 drivers/thermal/rockchip_thermal.c            |  6 +-
 drivers/thermal/sprd_thermal.c                |  6 +-
 drivers/thermal/thermal_core.c                | 65 ++++++++++++++++---
 drivers/thermal/thermal_core.h                |  3 +
 drivers/thermal/thermal_sysfs.c               | 29 +--------
 include/linux/thermal.h                       | 22 ++++++-
 17 files changed, 121 insertions(+), 224 deletions(-)

base-commit: 79799562bf087b30d9dd0fddf5bed2d3b038be08

Signature · 1 line
2.17.1