From nobody Tue Dec 2 02:19:40 2025 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71A52217F29; Thu, 20 Nov 2025 03:42:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763610139; cv=none; b=Z4ydEBYgvJZGm/PIP9+4uDmW+XTeqTLQUwVKWk1Ox5N8CzvmK8o8P8QZ8YaFX3p+8U3BOpXN+fRspUTQ1xZZbKVo8lTLj3J5UrPztL7c7Zu3oUig32eTdstJWZoxsd4xonDy7X9uYdMfYbeaTgYByB6pLOdlMEVZawTW4/bZls8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763610139; c=relaxed/simple; bh=oDZXT4sv1K0W1YpV7lschRL0Y5czBdVRkSfBLa1GSU4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=alPLxqbra4MmRP626GNLxQRsKmeWkGqm71MAJypjDNfBW+HQOclc4hlEQGc9HBQfebPU682NOzoppK9qqt1qRmevk1i7a5EkEWIaQm3BmpNGn4mmn2dMD9y+4Go5kBAa0PgCT/dxYjE8gU939G1AiqPKjOJcI+b3v39c9aRuQCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=Fn+QVfxa; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="Fn+QVfxa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1763610103; x=1764214903; i=w_armin@gmx.de; bh=yGCAfufdk5uS0AxJlXQPTK96nfX3x9IiOUSTFIkZ/is=; h=X-UI-Sender-Class:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Fn+QVfxaSd0iv80J/t3/nHz27I4UZwNn/U8ZC4n7U53UXfe6mivDKKOhlfkOmgU5 kgRauhVnYUVO4DvkYlaeaaST5QdgH9gBgq5HI8FkCbn8rwB7pbo+rAX0nrSM8VO8i 0630u+KDujYVAtPnXhJ9kBRV3uPE/16oaWSQPsZsSqjEc+jYRZXbQsu6ke6hcooL/ 3q78rGoz1CXC5hCz3F75IQNumahYNZtk1y9z6f6LegSibcTox8sBJ1/Ir2R5lH/iY LPEKdA+esjJQNPXPZjwOc/UUo80AHXuuh2t0qaswri+onvVodEaAVl0bNeGH75Lnf A2AYMzyB3p+S2yHn8Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [127.0.0.1] ([93.202.247.91]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpDNf-1vvqqv49BH-00oEAf; Thu, 20 Nov 2025 04:41:43 +0100 From: Armin Wolf Date: Thu, 20 Nov 2025 04:41:18 +0100 Subject: [PATCH RFC RESEND 8/8] thermal: core: Allow setting the parent device of thermal zone devices Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251120-thermal-device-v1-8-bbdad594d57a@gmx.de> References: <20251120-thermal-device-v1-0-bbdad594d57a@gmx.de> In-Reply-To: <20251120-thermal-device-v1-0-bbdad594d57a@gmx.de> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Len Brown , Jonathan Corbet , Ido Schimmel , Petr Machata Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, ath11k@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org X-Mailer: b4 0.14.3 X-Provags-ID: V03:K1:R29awBHW0pqrjeABaMJFeDeacollc6WnJKGlNk9Wna3omHYXCjn m61RHMalT6Lb2k4YAfSPR7ytFyN0UtIL90dS+nXkcN4L3ICEvRK9gpAPBEyzklGXl/Lz2DD bg0fadpRxNvgexXTaEqozYWxR36WENOxDYp6KdPE4bWpFRrS270/z3yY1fChEG4kRsCNEH+ sM5FUlwuIXR0Xxm961Frg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:i5pXje0rV6w=;1Ujnq5tb+zNr7M3rsTtP+kZayRV ancx6xUVQIUEwPlazkpjsn0EhKtNVDEvTKAAm7G/IocKkQGHhJK6CIDgUvc+z1yFjoYSWa2Nf qv6Um4zy7A4RDNI6ljHV+snROJ+bJBbb9XYvlekz/3FjLMzLmQNQVKsGBVVa5e2+i6i6z+fsE uE7/9j2V2YP+ZuSPfjjpyhSxm5IY9mN0R72HMcuxNdC4w/cxBnzTaiGHxIiKqJvXGEVYFAYHg 3iDKwfDxfA/qrQLIfLBp3ploR7tA83wNbenDn+I+84Smgh5MccRzozxkTIzMN/D5WRzXG2QCM pyHjfR1D3syCZHL+Yt7whWeZkN/d1Bu81ybw8s+VhaMuEjLTKitJkb/Y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1FI5XNQqM0vRDJl9f/Nba/2NRCegqSm403m2JapzKTGrvB2dDKHs55JSUxkB3e+CETZoZZtrU YC23kBWm7bjZTMMkfRCe9CoHSuxZe+/qnAYx+8m28ZItUv0BOfYCuFm0RRDC9ALMnnxbwMArp Mwfk1/GDcO1KtK0DXX+NGr2aHh1TnqwJuOOKnhW8eRWRCP417NxFMQUBsJbM1aOw3+6bKvI7W qk5r4unUjS0EzGqok2Zl0mJAxwKA/Fv+A9Rba57IDR2d5iJ2WlPJ/Rep5Nx9AIFy0eSyXP1Nq 0+Oyx+5xL48Mo7JMBwCGjOdMDPaiglc+Rp3t3Edx5LrtLbg6MlWgb5Xp/vsb+lp6bFtFOwLBM 0UH0HVKj0zkzgzOWpPkJrvcpU8Z7tL9jTKtUjR0dWhkCj901uETU3RY1lGWtGEywAZoOwJ9oT hkWF5lUtO0jtC3smHxw1CCEhnvuv9xpNetftWDuFgDMuJUN7SE9VsRnY6xmLJXflSpIec8dLl iv7aV0MXB6CZqosyTLwRwil+wakBpW3/uNqW9D6jPgjU00t/Z4S3/YH/3TjqUzekkQzvFqJSz CUfRTePltfG2wKPuR/dG5eCtG89lb7iEx8/m/04H1n//ydNxH8KBjvrNGn0TwXC5zGFRfG7ff HvbSsrD2jhnQFI+oi6Y+PLKNIKBgOEZRu8ahvNdYprZRAZaK/eQ== Thermal zone devices currently have no parent device, potentially causing issues with suspend ordering and making it impossible for user space appications to associate a given thermal zone device with its parent device. Extend the functions used to register thermal zone devices to also accept a parent device pointer. Also update all users of those functions to provide a parent device pointer if available. Signed-off-by: Armin Wolf --- Documentation/driver-api/thermal/sysfs-api.rst | 5 ++- drivers/acpi/thermal.c | 16 +++++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 4 +- drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 45 +++++++++++-------= ---- drivers/net/wireless/intel/iwlwifi/mld/thermal.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 10 ++--- drivers/platform/x86/acerhdf.c | 2 +- drivers/power/supply/power_supply_core.c | 4 +- drivers/thermal/armada_thermal.c | 2 +- drivers/thermal/da9062-thermal.c | 2 +- drivers/thermal/dove_thermal.c | 2 +- drivers/thermal/imx_thermal.c | 2 +- .../intel/int340x_thermal/int3400_thermal.c | 2 +- .../intel/int340x_thermal/int340x_thermal_zone.c | 13 +++---- .../int340x_thermal/processor_thermal_device_pci.c | 7 ++-- drivers/thermal/intel/intel_pch_thermal.c | 2 +- drivers/thermal/intel/intel_quark_dts_thermal.c | 2 +- drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +- drivers/thermal/intel/x86_pkg_temp_thermal.c | 6 +-- drivers/thermal/kirkwood_thermal.c | 2 +- drivers/thermal/renesas/rcar_thermal.c | 10 +++-- drivers/thermal/spear_thermal.c | 2 +- drivers/thermal/testing/zone.c | 2 +- drivers/thermal/thermal_core.c | 7 +++- drivers/thermal/thermal_of.c | 9 +++-- include/linux/thermal.h | 4 ++ 26 files changed, 92 insertions(+), 74 deletions(-) diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation= /driver-api/thermal/sysfs-api.rst index cf242cd16f2e..0a29bc949ef3 100644 --- a/Documentation/driver-api/thermal/sysfs-api.rst +++ b/Documentation/driver-api/thermal/sysfs-api.rst @@ -37,7 +37,8 @@ temperature) and throttle appropriate devices. :: =20 struct thermal_zone_device * - thermal_zone_device_register_with_trips(const char *type, + thermal_zone_device_register_with_trips(struct device *parent, + const char *type, const struct thermal_trip *trips, int num_trips, void *devdata, const struct thermal_zone_device_ops *ops, @@ -49,6 +50,8 @@ temperature) and throttle appropriate devices. /sys/class/thermal folder as `thermal_zone[0-*]`. It tries to bind all= the thermal cooling devices registered to it at the same time. =20 + parent: + parent device pointer. type: the thermal zone type. trips: diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 99ad67bbd764..483e28ce0d67 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -607,16 +607,20 @@ static int acpi_thermal_register_thermal_zone(struct = acpi_thermal *tz, unsigned int trip_count, int passive_delay) { + unsigned int polling_delay =3D tz->polling_frequency * 100; int result; =20 if (trip_count) - tz->thermal_zone =3D thermal_zone_device_register_with_trips( - "acpitz", trip_table, trip_count, tz, - &acpi_thermal_zone_ops, NULL, passive_delay, - tz->polling_frequency * 100); + tz->thermal_zone =3D thermal_zone_device_register_with_trips(&tz->device= ->dev, + "acpitz", trip_table, + trip_count, tz, + &acpi_thermal_zone_ops, + NULL, passive_delay, + polling_delay); else - tz->thermal_zone =3D thermal_tripless_zone_device_register( - "acpitz", tz, &acpi_thermal_zone_ops, NULL); + tz->thermal_zone =3D thermal_tripless_zone_device_register(&tz->device->= dev, "acpitz", + tz, &acpi_thermal_zone_ops, + NULL); =20 if (IS_ERR(tz->thermal_zone)) return PTR_ERR(tz->thermal_zone); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c b/drivers/n= et/ethernet/chelsio/cxgb4/cxgb4_thermal.c index 7bab8da8f6e6..05a1ec7df7a5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c @@ -59,8 +59,8 @@ int cxgb4_thermal_init(struct adapter *adap) } =20 snprintf(ch_tz_name, sizeof(ch_tz_name), "cxgb4_%s", adap->name); - ch_thermal->tzdev =3D thermal_zone_device_register_with_trips(ch_tz_name,= &trip, num_trip, - adap, + ch_thermal->tzdev =3D thermal_zone_device_register_with_trips(adap->pdev_= dev, ch_tz_name, + &trip, num_trip, adap, &cxgb4_thermal_ops, NULL, 0, 0); if (IS_ERR(ch_thermal->tzdev)) { diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/n= et/ethernet/mellanox/mlxsw/core_thermal.c index 1117d59b74fd..a1b1e9e8dd3d 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -349,6 +349,8 @@ static const struct thermal_cooling_device_ops mlxsw_co= oling_ops =3D { static int mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz) { + unsigned int polling_delay =3D module_tz->parent->polling_delay; + struct device *dev =3D module_tz->parent->bus_info->dev; char tz_name[40]; int err; =20 @@ -358,14 +360,12 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_mod= ule *module_tz) else snprintf(tz_name, sizeof(tz_name), "mlxsw-module%d", module_tz->module + 1); - module_tz->tzdev =3D thermal_zone_device_register_with_trips(tz_name, - module_tz->trips, - MLXSW_THERMAL_NUM_TRIPS, - module_tz, - &mlxsw_thermal_module_ops, - &mlxsw_thermal_params, - 0, - module_tz->parent->polling_delay); + module_tz->tzdev =3D thermal_zone_device_register_with_trips(dev, tz_name= , module_tz->trips, + MLXSW_THERMAL_NUM_TRIPS, + module_tz, + &mlxsw_thermal_module_ops, + &mlxsw_thermal_params, 0, + polling_delay); if (IS_ERR(module_tz->tzdev)) { err =3D PTR_ERR(module_tz->tzdev); return err; @@ -466,6 +466,8 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *therma= l, static int mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz) { + unsigned int polling_delay =3D gearbox_tz->parent->polling_delay; + struct device *dev =3D gearbox_tz->parent->bus_info->dev; char tz_name[40]; int ret; =20 @@ -475,13 +477,13 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_mo= dule *gearbox_tz) else snprintf(tz_name, sizeof(tz_name), "mlxsw-gearbox%d", gearbox_tz->module + 1); - gearbox_tz->tzdev =3D thermal_zone_device_register_with_trips(tz_name, - gearbox_tz->trips, - MLXSW_THERMAL_NUM_TRIPS, - gearbox_tz, - &mlxsw_thermal_gearbox_ops, - &mlxsw_thermal_params, 0, - gearbox_tz->parent->polling_delay); + gearbox_tz->tzdev =3D thermal_zone_device_register_with_trips(dev, tz_nam= e, + gearbox_tz->trips, + MLXSW_THERMAL_NUM_TRIPS, + gearbox_tz, + &mlxsw_thermal_gearbox_ops, + &mlxsw_thermal_params, 0, + polling_delay); if (IS_ERR(gearbox_tz->tzdev)) return PTR_ERR(gearbox_tz->tzdev); =20 @@ -709,13 +711,12 @@ int mlxsw_thermal_init(struct mlxsw_core *core, MLXSW_THERMAL_SLOW_POLL_INT : MLXSW_THERMAL_POLL_INT; =20 - thermal->tzdev =3D thermal_zone_device_register_with_trips("mlxsw", - thermal->trips, - MLXSW_THERMAL_NUM_TRIPS, - thermal, - &mlxsw_thermal_ops, - &mlxsw_thermal_params, 0, - thermal->polling_delay); + thermal->tzdev =3D thermal_zone_device_register_with_trips(dev, "mlxsw", + thermal->trips, + MLXSW_THERMAL_NUM_TRIPS, + thermal, &mlxsw_thermal_ops, + &mlxsw_thermal_params, 0, + thermal->polling_delay); if (IS_ERR(thermal->tzdev)) { err =3D PTR_ERR(thermal->tzdev); dev_err(dev, "Failed to register thermal zone\n"); diff --git a/drivers/net/wireless/intel/iwlwifi/mld/thermal.c b/drivers/net= /wireless/intel/iwlwifi/mld/thermal.c index 9e56e6e80ab7..56a0022d33db 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/thermal.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/thermal.c @@ -256,7 +256,7 @@ static void iwl_mld_thermal_zone_register(struct iwl_ml= d *mld) =20 sprintf(name, "iwlwifi_%u", atomic_inc_return(&counter) & 0xFF); mld->tzone =3D - thermal_zone_device_register_with_trips(name, trips, + thermal_zone_device_register_with_trips(mld->dev, name, trips, IWL_MAX_DTS_TRIPS, mld, &tzone_ops, NULL, 0, 0); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wire= less/intel/iwlwifi/mvm/tt.c index b184f08230b9..e4777b815976 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -672,11 +672,11 @@ static void iwl_mvm_thermal_zone_register(struct iwl_= mvm *mvm) mvm->tz_device.trips[i].type =3D THERMAL_TRIP_PASSIVE; mvm->tz_device.trips[i].flags =3D THERMAL_TRIP_FLAG_RW_TEMP; } - mvm->tz_device.tzone =3D thermal_zone_device_register_with_trips(name, - mvm->tz_device.trips, - IWL_MAX_DTS_TRIPS, - mvm, &tzone_ops, - NULL, 0, 0); + mvm->tz_device.tzone =3D thermal_zone_device_register_with_trips(mvm->dev= , name, + mvm->tz_device.trips, + IWL_MAX_DTS_TRIPS, + mvm, &tzone_ops, + NULL, 0, 0); if (IS_ERR(mvm->tz_device.tzone)) { IWL_DEBUG_TEMP(mvm, "Failed to register to thermal zone (err =3D %ld)\n", diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c index c74937d475e5..abdb5749c169 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c @@ -656,7 +656,7 @@ static int __init acerhdf_register_thermal(void) if (IS_ERR(cl_dev)) return -EINVAL; =20 - thz_dev =3D thermal_zone_device_register_with_trips("acerhdf", trips, ARR= AY_SIZE(trips), + thz_dev =3D thermal_zone_device_register_with_trips(NULL, "acerhdf", trip= s, ARRAY_SIZE(trips), NULL, &acerhdf_dev_ops, &acerhdf_zone_params, 0, (kernelmode) ? interval*1000 : 0); diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/suppl= y/power_supply_core.c index 9a28381e2607..cbc4bed17efa 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -1531,8 +1531,8 @@ static int psy_register_thermal(struct power_supply *= psy) struct thermal_zone_params tzp =3D { .no_hwmon =3D IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON) }; - psy->tzd =3D thermal_tripless_zone_device_register(psy->desc->name, - psy, &psy_tzd_ops, &tzp); + psy->tzd =3D thermal_tripless_zone_device_register(&psy->dev, psy->desc-= >name, psy, + &psy_tzd_ops, &tzp); if (IS_ERR(psy->tzd)) return PTR_ERR(psy->tzd); ret =3D thermal_zone_device_enable(psy->tzd); diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_ther= mal.c index c2fbdb534f61..fc60b0bab627 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -871,7 +871,7 @@ static int armada_thermal_probe(struct platform_device = *pdev) /* Wait the sensors to be valid */ armada_wait_sensor_validity(priv); =20 - tz =3D thermal_tripless_zone_device_register(priv->zone_name, + tz =3D thermal_tripless_zone_device_register(&pdev->dev, priv->zone_name, priv, &legacy_ops, NULL); if (IS_ERR(tz)) { diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-ther= mal.c index a8d4b766ba21..c5368c2b53b9 100644 --- a/drivers/thermal/da9062-thermal.c +++ b/drivers/thermal/da9062-thermal.c @@ -196,7 +196,7 @@ static int da9062_thermal_probe(struct platform_device = *pdev) INIT_DELAYED_WORK(&thermal->work, da9062_thermal_poll_on); mutex_init(&thermal->lock); =20 - thermal->zone =3D thermal_zone_device_register_with_trips(thermal->config= ->name, + thermal->zone =3D thermal_zone_device_register_with_trips(&pdev->dev, the= rmal->config->name, trips, ARRAY_SIZE(trips), thermal, &da9062_thermal_ops, NULL, pp_tmp, 0); diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index 723bc72f0626..101c6109b04a 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c @@ -139,7 +139,7 @@ static int dove_thermal_probe(struct platform_device *p= dev) return ret; } =20 - thermal =3D thermal_tripless_zone_device_register("dove_thermal", priv, + thermal =3D thermal_tripless_zone_device_register(&pdev->dev, "dove_therm= al", priv, &ops, NULL); if (IS_ERR(thermal)) { dev_err(&pdev->dev, diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 38c993d1bcb3..043e80756017 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -679,7 +679,7 @@ static int imx_thermal_probe(struct platform_device *pd= ev) goto legacy_cleanup; } =20 - data->tz =3D thermal_zone_device_register_with_trips("imx_thermal_zone", + data->tz =3D thermal_zone_device_register_with_trips(dev, "imx_thermal_zo= ne", trips, ARRAY_SIZE(trips), data, diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/driv= ers/thermal/intel/int340x_thermal/int3400_thermal.c index 41d3bc3ed8a2..ed21da8f0a47 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -594,7 +594,7 @@ static int int3400_thermal_probe(struct platform_device= *pdev) =20 evaluate_odvp(priv); =20 - priv->thermal =3D thermal_tripless_zone_device_register("INT3400 Thermal"= , priv, + priv->thermal =3D thermal_tripless_zone_device_register(&pdev->dev, "INT3= 400 Thermal", priv, &int3400_thermal_ops, &int3400_thermal_params); if (IS_ERR(priv->thermal)) { diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b= /drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 3d9efe69d562..3adccb7fc157 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -160,13 +160,12 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(= struct acpi_device *adev, =20 int34x_zone->lpat_table =3D acpi_lpat_get_conversion_table(adev->handle); =20 - int34x_zone->zone =3D thermal_zone_device_register_with_trips( - acpi_device_bid(adev), - zone_trips, trip_cnt, - int34x_zone, - &zone_ops, - &int340x_thermal_params, - 0, 0); + int34x_zone->zone =3D thermal_zone_device_register_with_trips(&adev->dev, + acpi_device_bid(adev), + zone_trips, trip_cnt, + int34x_zone, &zone_ops, + &int340x_thermal_params, + 0, 0); kfree(zone_trips); =20 if (IS_ERR(int34x_zone->zone)) { diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device= _pci.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci= .c index 0d4dcc66e097..2b3116e23fa1 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c @@ -371,10 +371,9 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev= , const struct pci_device_ =20 psv_trip.temperature =3D get_trip_temp(pci_info); =20 - pci_info->tzone =3D thermal_zone_device_register_with_trips("TCPU_PCI", &= psv_trip, - 1, pci_info, - &tzone_ops, - &tzone_params, 0, 0); + pci_info->tzone =3D thermal_zone_device_register_with_trips(&pdev->dev, "= TCPU_PCI", &psv_trip, + 1, pci_info, &tzone_ops, + &tzone_params, 0, 0); if (IS_ERR(pci_info->tzone)) { ret =3D PTR_ERR(pci_info->tzone); goto err_del_legacy; diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/in= tel/intel_pch_thermal.c index fc326985796c..754527b2b09a 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -235,7 +235,7 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev, =20 nr_trips +=3D pch_wpt_add_acpi_psv_trip(ptd, &ptd_trips[nr_trips]); =20 - ptd->tzd =3D thermal_zone_device_register_with_trips(board_names[board_id= ], + ptd->tzd =3D thermal_zone_device_register_with_trips(&pdev->dev, board_na= mes[board_id], ptd_trips, nr_trips, ptd, &tzd_ops, NULL, 0, 0); diff --git a/drivers/thermal/intel/intel_quark_dts_thermal.c b/drivers/ther= mal/intel/intel_quark_dts_thermal.c index 89498eb29a89..d8d38b6ed452 100644 --- a/drivers/thermal/intel/intel_quark_dts_thermal.c +++ b/drivers/thermal/intel/intel_quark_dts_thermal.c @@ -376,7 +376,7 @@ static struct soc_sensor_entry *alloc_soc_dts(void) trips[QRK_DTS_ID_TP_HOT].temperature =3D get_trip_temp(QRK_DTS_ID_TP_HOT); trips[QRK_DTS_ID_TP_HOT].type =3D THERMAL_TRIP_HOT; =20 - aux_entry->tzone =3D thermal_zone_device_register_with_trips("quark_dts", + aux_entry->tzone =3D thermal_zone_device_register_with_trips(NULL, "quark= _dts", trips, QRK_MAX_DTS_TRIPS, aux_entry, diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/i= ntel/intel_soc_dts_iosf.c index ea87439fe7a9..74638dac75e6 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -230,7 +230,7 @@ static int add_dts_thermal_zone(int id, struct intel_so= c_dts_sensor_entry *dts, } } snprintf(name, sizeof(name), "soc_dts%d", id); - dts->tzone =3D thermal_zone_device_register_with_trips(name, trips, + dts->tzone =3D thermal_zone_device_register_with_trips(NULL, name, trips, SOC_MAX_DTS_TRIPS, dts, &tzone_ops, NULL, 0, 0); diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal= /intel/x86_pkg_temp_thermal.c index 3fc679b6f11b..807126dc4bea 100644 --- a/drivers/thermal/intel/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c @@ -342,9 +342,9 @@ static int pkg_temp_thermal_device_add(unsigned int cpu) =20 INIT_DELAYED_WORK(&zonedev->work, pkg_temp_thermal_threshold_work_fn); zonedev->cpu =3D cpu; - zonedev->tzone =3D thermal_zone_device_register_with_trips("x86_pkg_temp", - trips, thres_count, - zonedev, &tzone_ops, &pkg_temp_tz_params, 0, 0); + zonedev->tzone =3D thermal_zone_device_register_with_trips(NULL, "x86_pkg= _temp", trips, + thres_count, zonedev, &tzone_ops, + &pkg_temp_tz_params, 0, 0); if (IS_ERR(zonedev->tzone)) { err =3D PTR_ERR(zonedev->tzone); goto out_kfree_zonedev; diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_= thermal.c index 4619e090f756..4827ad2bdb49 100644 --- a/drivers/thermal/kirkwood_thermal.c +++ b/drivers/thermal/kirkwood_thermal.c @@ -71,7 +71,7 @@ static int kirkwood_thermal_probe(struct platform_device = *pdev) if (IS_ERR(priv->sensor)) return PTR_ERR(priv->sensor); =20 - thermal =3D thermal_tripless_zone_device_register("kirkwood_thermal", + thermal =3D thermal_tripless_zone_device_register(&pdev->dev, "kirkwood_t= hermal", priv, &ops, NULL); if (IS_ERR(thermal)) { dev_err(&pdev->dev, diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renes= as/rcar_thermal.c index fdd7afdc4ff6..3d228e4c7b09 100644 --- a/drivers/thermal/renesas/rcar_thermal.c +++ b/drivers/thermal/renesas/rcar_thermal.c @@ -488,10 +488,12 @@ static int rcar_thermal_probe(struct platform_device = *pdev) dev, i, priv, &rcar_thermal_zone_ops); } else { - priv->zone =3D thermal_zone_device_register_with_trips( - "rcar_thermal", trips, ARRAY_SIZE(trips), priv, - &rcar_thermal_zone_ops, NULL, 0, - idle); + priv->zone =3D thermal_zone_device_register_with_trips(dev, "rcar_therm= al", + trips, + ARRAY_SIZE(trips), + priv, + &rcar_thermal_zone_ops, + NULL, 0, idle); =20 ret =3D thermal_zone_device_enable(priv->zone); if (ret) { diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_therma= l.c index 603dadcd3df5..c5bba9d600d4 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -122,7 +122,7 @@ static int spear_thermal_probe(struct platform_device *= pdev) stdev->flags =3D val; writel_relaxed(stdev->flags, stdev->thermal_base); =20 - spear_thermal =3D thermal_tripless_zone_device_register("spear_thermal", + spear_thermal =3D thermal_tripless_zone_device_register(&pdev->dev, "spea= r_thermal", stdev, &ops, NULL); if (IS_ERR(spear_thermal)) { dev_err(&pdev->dev, "thermal zone device is NULL\n"); diff --git a/drivers/thermal/testing/zone.c b/drivers/thermal/testing/zone.c index c12c405225bb..5a7e9969582e 100644 --- a/drivers/thermal/testing/zone.c +++ b/drivers/thermal/testing/zone.c @@ -402,7 +402,7 @@ static int tt_zone_register_tz(struct tt_thermal_zone *= tt_zone) =20 tt_zone->tz_temp =3D tt_zone->temp; =20 - tz =3D thermal_zone_device_register_with_trips("test_tz", trips, i, tt_zo= ne, + tz =3D thermal_zone_device_register_with_trips(NULL, "test_tz", trips, i,= tt_zone, &tt_zone_ops, NULL, 0, 0); if (IS_ERR(tz)) return PTR_ERR(tz); diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 92e51d2e4535..9d8499999579 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1475,6 +1475,7 @@ static void thermal_zone_init_complete(struct thermal= _zone_device *tz) =20 /** * thermal_zone_device_register_with_trips() - register a new thermal zone= device + * @parent: parent device pointer * @type: the thermal zone device type * @trips: a pointer to an array of thermal trips * @num_trips: the number of trip points the thermal zone support @@ -1498,7 +1499,7 @@ static void thermal_zone_init_complete(struct thermal= _zone_device *tz) * IS_ERR*() helpers. */ struct thermal_zone_device * -thermal_zone_device_register_with_trips(const char *type, +thermal_zone_device_register_with_trips(struct device *parent, const char = *type, const struct thermal_trip *trips, int num_trips, void *devdata, const struct thermal_zone_device_ops *ops, @@ -1576,6 +1577,7 @@ thermal_zone_device_register_with_trips(const char *t= ype, tz->ops.critical =3D thermal_zone_device_critical; =20 tz->device.class =3D thermal_class; + tz->device.parent =3D parent; tz->devdata =3D devdata; tz->num_trips =3D num_trips; for_each_trip_desc(tz, td) { @@ -1651,12 +1653,13 @@ thermal_zone_device_register_with_trips(const char = *type, EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips); =20 struct thermal_zone_device *thermal_tripless_zone_device_register( + struct device *parent, const char *type, void *devdata, const struct thermal_zone_device_ops *ops, const struct thermal_zone_params *tzp) { - return thermal_zone_device_register_with_trips(type, NULL, 0, devdata, + return thermal_zone_device_register_with_trips(parent, type, NULL, 0, dev= data, ops, tzp, 0, 0); } EXPORT_SYMBOL_GPL(thermal_tripless_zone_device_register); diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 1a51a4d240ff..e3359ca20d77 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -354,6 +354,7 @@ static void thermal_of_zone_unregister(struct thermal_z= one_device *tz) * zone properties and registers new thermal zone with those * properties. * + * @parent: parent device pointer * @sensor: A device node pointer corresponding to the sensor in the devic= e tree * @id: An integer as sensor identifier * @data: A private data to be stored in the thermal zone dedicated privat= e area @@ -364,7 +365,9 @@ static void thermal_of_zone_unregister(struct thermal_z= one_device *tz) * - ENOMEM: if one structure can not be allocated * - Other negative errors are returned by the underlying called functions */ -static struct thermal_zone_device *thermal_of_zone_register(struct device_= node *sensor, int id, void *data, +static struct thermal_zone_device *thermal_of_zone_register(struct device = *parent, + struct device_node *sensor, + int id, void *data, const struct thermal_zone_device_ops *ops) { struct thermal_zone_device_ops of_ops =3D *ops; @@ -412,7 +415,7 @@ static struct thermal_zone_device *thermal_of_zone_regi= ster(struct device_node * of_ops.critical =3D thermal_zone_device_critical_shutdown; } =20 - tz =3D thermal_zone_device_register_with_trips(np->name, trips, ntrips, + tz =3D thermal_zone_device_register_with_trips(parent, np->name, trips, n= trips, data, &of_ops, &tzp, pdelay, delay); if (IS_ERR(tz)) { @@ -478,7 +481,7 @@ struct thermal_zone_device *devm_thermal_of_zone_regist= er(struct device *dev, in if (!ptr) return ERR_PTR(-ENOMEM); =20 - tzd =3D thermal_of_zone_register(dev->of_node, sensor_id, data, ops); + tzd =3D thermal_of_zone_register(dev, dev->of_node, sensor_id, data, ops); if (IS_ERR(tzd)) { devres_free(ptr); return tzd; diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 29a608bf5f80..0c5a91313bd5 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -226,6 +226,7 @@ int thermal_zone_get_crit_temp(struct thermal_zone_devi= ce *tz, int *temp); =20 #ifdef CONFIG_THERMAL struct thermal_zone_device *thermal_zone_device_register_with_trips( + struct device *parent, const char *type, const struct thermal_trip *trips, int num_trips, void *devdata, @@ -235,6 +236,7 @@ struct thermal_zone_device *thermal_zone_device_registe= r_with_trips( unsigned int polling_delay); =20 struct thermal_zone_device *thermal_tripless_zone_device_register( + struct device *parent, const char *type, void *devdata, const struct thermal_zone_device_ops *ops, @@ -276,6 +278,7 @@ int thermal_zone_device_disable(struct thermal_zone_dev= ice *tz); void thermal_zone_device_critical(struct thermal_zone_device *tz); #else static inline struct thermal_zone_device *thermal_zone_device_register_wit= h_trips( + struct device *parent, const char *type, const struct thermal_trip *trips, int num_trips, void *devdata, @@ -285,6 +288,7 @@ static inline struct thermal_zone_device *thermal_zone_= device_register_with_trip { return ERR_PTR(-ENODEV); } =20 static inline struct thermal_zone_device *thermal_tripless_zone_device_reg= ister( + struct device *parent, const char *type, void *devdata, struct thermal_zone_device_ops *ops, --=20 2.39.5