Thread (8 messages) 8 messages, 5 authors, 2023-02-22

Re: [PATCH v2 01/16] thermal/core: Add a thermal zone 'devdata' accessor

From: Jernej Škrabec <jernej.skrabec@gmail.com>
Date: 2023-02-21 18:21:05
Also in: linux-acpi, linux-arm-msm, linux-hwmon, linux-ide, linux-iio, linux-input, linux-mediatek, linux-omap, linux-pm, linux-renesas-soc, linux-samsung-soc, linux-sunxi, linux-tegra, linux-wireless, lkml

Dne torek, 21. februar 2023 ob 19:06:55 CET je Daniel Lezcano napisal(a):
The thermal zone device structure is exposed to the different drivers
and obviously they access the internals while that should be
restricted to the core thermal code.

In order to self-encapsulate the thermal core code, we need to prevent
the drivers accessing directly the thermal zone structure and provide
accessor functions to deal with.

Provide an accessor to the 'devdata' structure and make use of it in
the different drivers.

No functional changes intended.

Signed-off-by: Daniel Lezcano <redacted>
Acked-by: Guenter Roeck <linux@roeck-us.net> #hwmon
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw
Reviewed-by: AngeloGioacchino Del Regno
[off-list ref] #MediaTek auxadc and lvts
Reviewed-by: Balsam CHIHI <redacted> #Mediatek lvts
Acked-by: Gregory Greenman <redacted> #iwlwifi
Reviewed-by: Adam Ward <redacted> #da9062
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>  #spread
Acked-by: Sebastian Reichel <redacted> #power_supply
---
 drivers/acpi/thermal.c                           | 16 ++++++++--------
 drivers/ata/ahci_imx.c                           |  2 +-
 drivers/hwmon/hwmon.c                            |  4 ++--
 drivers/hwmon/pmbus/pmbus_core.c                 |  2 +-
 drivers/hwmon/scmi-hwmon.c                       |  2 +-
 drivers/hwmon/scpi-hwmon.c                       |  2 +-
 drivers/iio/adc/sun4i-gpadc-iio.c                |  2 +-
 drivers/input/touchscreen/sun4i-ts.c             |  2 +-
 .../net/ethernet/chelsio/cxgb4/cxgb4_thermal.c   |  2 +-
 .../net/ethernet/mellanox/mlxsw/core_thermal.c   | 14 +++++++-------
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c      |  4 ++--
 drivers/power/supply/power_supply_core.c         |  2 +-
 drivers/regulator/max8973-regulator.c            |  2 +-
 drivers/thermal/armada_thermal.c                 |  4 ++--
 drivers/thermal/broadcom/bcm2711_thermal.c       |  2 +-
 drivers/thermal/broadcom/bcm2835_thermal.c       |  2 +-
 drivers/thermal/broadcom/brcmstb_thermal.c       |  4 ++--
 drivers/thermal/broadcom/ns-thermal.c            |  2 +-
 drivers/thermal/broadcom/sr-thermal.c            |  2 +-
 drivers/thermal/da9062-thermal.c                 |  2 +-
 drivers/thermal/dove_thermal.c                   |  2 +-
 drivers/thermal/hisi_thermal.c                   |  2 +-
 drivers/thermal/imx8mm_thermal.c                 |  2 +-
 drivers/thermal/imx_sc_thermal.c                 |  2 +-
 drivers/thermal/imx_thermal.c                    |  6 +++---
 drivers/thermal/intel/intel_pch_thermal.c        |  2 +-
 drivers/thermal/intel/intel_soc_dts_iosf.c       | 13 +++++--------
 drivers/thermal/intel/x86_pkg_temp_thermal.c     |  4 ++--
 drivers/thermal/k3_bandgap.c                     |  2 +-
 drivers/thermal/k3_j72xx_bandgap.c               |  2 +-
 drivers/thermal/kirkwood_thermal.c               |  2 +-
 drivers/thermal/max77620_thermal.c               |  2 +-
 drivers/thermal/mediatek/auxadc_thermal.c        |  2 +-
 drivers/thermal/mediatek/lvts_thermal.c          |  4 ++--
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c         |  4 ++--
 drivers/thermal/qcom/qcom-spmi-temp-alarm.c      |  4 ++--
 drivers/thermal/qoriq_thermal.c                  |  2 +-
 drivers/thermal/rcar_gen3_thermal.c              |  4 ++--
 drivers/thermal/rcar_thermal.c                   |  3 +--
 drivers/thermal/rockchip_thermal.c               |  4 ++--
 drivers/thermal/rzg2l_thermal.c                  |  2 +-
 drivers/thermal/samsung/exynos_tmu.c             |  4 ++--
 drivers/thermal/spear_thermal.c                  |  8 ++++----
 drivers/thermal/sprd_thermal.c                   |  2 +-
 drivers/thermal/sun8i_thermal.c                  |  2 +-
For sun8i_thermal:
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej
 drivers/thermal/tegra/tegra-bpmp-thermal.c       |  6 ++++--
 drivers/thermal/tegra/tegra30-tsensor.c          |  4 ++--
 drivers/thermal/thermal-generic-adc.c            |  2 +-
 drivers/thermal/thermal_core.c                   |  6 ++++++
 drivers/thermal/thermal_mmio.c                   |  2 +-
 .../thermal/ti-soc-thermal/ti-thermal-common.c   |  4 ++--
 drivers/thermal/uniphier_thermal.c               |  2 +-
 include/linux/thermal.h                          |  7 +++++++
 53 files changed, 102 insertions(+), 91 deletions(-)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help