From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 009B72EC0A1 for ; Sun, 19 Apr 2026 18:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776622971; cv=none; b=fAvRRDF1sD7vHr/2JSNOAEdm//ZmSRwxtImfoJdl1ILgj5lLyz9tA+cTO538nNXwl/LrGUJlYvd9LLMe2fbAVIN0vaim1bej/+zgIzsTt/GumeWZ8UZzBUM3+d4cNM5t8jX48i2A+NgfNBIFGoIZKRxzlmz49BJkAkW07f7xdVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776622971; c=relaxed/simple; bh=+x9c9NXuRa5b02u2PWhWcGBzOOAZ9xf2sJMC+EoLd2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NL1ut/1sYepk78FRk3dqtprBIn7+JZf5ReSjEufNT22tfZOsEhHKcGC6TI8ae/K3Vgp17+0tWFrnrN9z4ewIERwrb+Xlt7K5U15ZzN7CvO0x5j0OnETXsxogv+in51XPkcX6rROPZfIZpUOB8Rqh5CbUr+4Fn0pZS2u4LSL5Dr8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=JwD1Tyb+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WbrSbzZh; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="JwD1Tyb+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WbrSbzZh" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63JFMrdL1410553 for ; Sun, 19 Apr 2026 18:22:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=lO8B9/Q2g6C ekw4Z+jMGvtIbLlF84pmBrYJu05mJ+9E=; b=JwD1Tyb+BwQ7FAk2LDV+ceBz1T9 TZOX0HAjW2onU8WkhUmGt1mGJ6JapPn0U+qkaJMqXst5n6cfnRe3wgdVhXztrTJM ZJZ/KVOlx+h9UYpRO9BRwpn7tdomK0bQkS3Gfj88x2WkPtSodImNo4/OLPM6YHG9 tfrRkya4KGJvZLl1qAsR+/HaK3j0+S1fnPJf9pqFdd32biMAVi3i3LIrYzSY5hN1 vKEEzJ8xiRLLSlUOHFyKGqf3vm1k2B1aCFp19eSPecAfMl/ATfGUVj4CZYq/uUqR uy6+13eYyRzTkOW+tE50BRAsuAP9ELSehUgogTzpwXad2CJC2fAWykONcdA== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dm21ujysf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 19 Apr 2026 18:22:49 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-50d5aa81907so49782431cf.0 for ; Sun, 19 Apr 2026 11:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776622968; x=1777227768; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lO8B9/Q2g6Cekw4Z+jMGvtIbLlF84pmBrYJu05mJ+9E=; b=WbrSbzZhuIXppn3v7XzYXGzPgcJ9YcxQItTPI5RYqy6cAY2Ez6bkm9WyUAWnh9KyCJ uK99kNRWPMXLVD4gmDIUKG6K4YwwOaLKO5+1Ik2sCJ7TkkjDMVp+VArlFMgYqTsi64Vs zocUc3g57mgrHRQnZsaKHGLC3rzSYXoMLwiVxPPEOUrUo9z+983UeNDrLGKXOwzuxAQO H5Ev45xVhTnZR9LhflFKHNzHXdW3umiKx/r7s9AGAzoPs/Wr+A4e1Ydn10ujkEVUgTbS W/f643EY7bNuHsS8NcRctcsWt5JqoPRtIQCRWz6WS/Z0fVYcjvF30XBQBns8LDFv4mMb ddkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776622968; x=1777227768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lO8B9/Q2g6Cekw4Z+jMGvtIbLlF84pmBrYJu05mJ+9E=; b=qcHatBnNU8pEqkzthm54bX7mUJS1Gbl2pb7Ak8pCmGvgFMHYECMBS3uU8MaWuFOFIw 2NDGn+3IPvhJb0wHWNUY/JlUDlH3MCnoIp/KT5EgwUlR6WAuJTeteLQX728p7EywGjzH 9vmG4oSPtjvTd5pSbEMqoh0V5mWzT5b6jvqOXnuAHqcKedLiTQzJII1wU/RogjvMEjo+ QVBCWz9LoQFAFgktNvlRGtfaheBY1mrI395E3skfMLm0GXx4OzzL29L3by5cUEI8jROL 2LJXAE12SIii1/oA9GYz+iX8+OIK16erYcguH2Dc3HXMyI2sTzfosWqn24T4zoTzmlNg 7WnQ== X-Forwarded-Encrypted: i=1; AFNElJ8O/ALR+QR5xzuSNts4d7ThXzJXeZl9l987MHKuO1h0Fj/d1+9yTUH93XffSatzYixIyGGYPJO3Hc2pLb4=@vger.kernel.org X-Gm-Message-State: AOJu0YyYLqjZ+qHv1VE2M687C7mV9PdLXxeDir5IrZMtlefRiyvO6ZFw nYDrmEl/XQsoOegEhlJYov/MW7nQFoIO3oDIBusuwPWdW6xLN3aLMkloWlx0rswt+ItDEP/ibvo /YaGd/T/bt4VOnXyCfPOhzbAk3dJbOLp8beRqdzGMsmxO/Jo6GCPF13xfvPOGTfxCjF0= X-Gm-Gg: AeBDietI2FkASfUfdFr7G3PqdLf2juXawBW6lOabVyez8nIDLa6gbHFzO+cW6RsMsML e9Qaiw/zSZNNcZhQod2HlCQz3/b5DjHOxOxSodLU1SkUoYN+bsOeAmdU/z0Wr/zuw2Jph2pxTdc x7RNhkd5sDOSyJVU7qZniGdUfpw8Y0E+VnUnMgMdeanEOX5gIzYOmIDuoMkFsJfn4Li+fVOgmke Sv/qao+Dk5NHtm+tY3n/jVNws+Z31FZJ0ZCtduZHOqwQF0XUj5EvnHwqx6P9HEQvKY0E7wasHW3 XSJmEZzwjUF1xx86LS5BSFEaKzXXwFiEkE7eh5aG/hJKPOWO1KWOcw0ZP1gg/4yZOLGJh8u7NLo DTuqRXnEwXXRM+rzSEc8bIWqc1mB/9pkln0PjA9f72KNxub7rnkN4IdBx5mon X-Received: by 2002:a05:622a:4cc4:b0:50d:8389:c3f4 with SMTP id d75a77b69052e-50e36c78259mr168044051cf.55.1776622968490; Sun, 19 Apr 2026 11:22:48 -0700 (PDT) X-Received: by 2002:a05:622a:4cc4:b0:50d:8389:c3f4 with SMTP id d75a77b69052e-50e36c78259mr168043551cf.55.1776622968086; Sun, 19 Apr 2026 11:22:48 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:ae20:597c:99b8:d161]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e59f97sm25723070f8f.37.2026.04.19.11.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2026 11:22:47 -0700 (PDT) From: Daniel Lezcano To: rafael@kernel.org Cc: gaurav.kohli@oss.qualcomm.com, Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Simona Vetter , Guenter Roeck , Joel Stanley , Andrew Jeffery , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Benson Leung , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Heiko Stuebner , Thierry Reding , Jonathan Hunter , Bjorn Andersson , Konrad Dybcio , Amit Daniel Kachhap , Viresh Kumar , Neil Armstrong , Amit Kucheria , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Daniel Lezcano Subject: [PATCH v1 09/14] thermal/core: Put of_node field cooling device structure under Kconfig option Date: Sun, 19 Apr 2026 20:21:53 +0200 Message-ID: <20260419182203.4083985-10-daniel.lezcano@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260419182203.4083985-1-daniel.lezcano@oss.qualcomm.com> References: <20260419182203.4083985-1-daniel.lezcano@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE5MDE5NyBTYWx0ZWRfX89igVLz/sIZS yJ0hEb6f96Bn8DbVT9dCoT3HhZPU+gQI5dcLO4DolqdXjRl78ga5MuM6qUcG+38wdLZ8srMkyde T8AXg31Gy1Z5rQ5o0HgPuLbdYWfmD6/ED2g5fDLsfJj7uq/jpKMKHbay4G9WjE9ebsOVWhX2lGK iBC1CiEDNHy2egh7A2Ef8YHA0vMt3evaqTe6U5zMkcb03gNjbrrhTyxuIBjp5t2C4TTaJ+sq5Td UOE2kpKsW1yx6uc2WLqtUNTWiLzMGrWwbAR8w4dslsHRkfgk6KRAJLZPWtCh6c7ZscbhZW0pre+ 4VS9fTO3ewD40xlpU1WpCU6bZ++zWzu3QnmO+x7YHQdRLyG+RgAurUYr+ZueCOE1HY/tIfGLth1 hS01/Ul4/xr3Sum8XJ+8kpXBtsxDXG9ftZB7r53q5qkcxM7N4+ajKp636HJXOUlSLzklpFc4vcg lyoR+IgUtHHavlKrmlQ== X-Proofpoint-GUID: K0JLaDCJe9YIIsYWarDIa9nrX99na8BS X-Proofpoint-ORIG-GUID: K0JLaDCJe9YIIsYWarDIa9nrX99na8BS X-Authority-Analysis: v=2.4 cv=WK1PmHsR c=1 sm=1 tr=0 ts=69e51d79 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=5aU8Z_IAf-MFAndoPNkA:9 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-19_05,2026-04-17_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 spamscore=0 malwarescore=0 bulkscore=0 suspectscore=0 phishscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604190197 The device node pointer in the cooling device structure is only needed by the thermal OF in order to bind a thermal zone with a cooling device. Now only the OF based drivers are using the thermal OF functions and do not call the function with a NULL device_node parameter as before. We can put this field under the CONFIG_THERMAL_OF condition and make it go away if the device tree is not used. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f7b8651c1ed0..a8e870ca2e27 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -125,7 +125,6 @@ struct thermal_cooling_device { const char *type; unsigned long max_state; struct device device; - struct device_node *np; void *devdata; void *stats; const struct thermal_cooling_device_ops *ops; @@ -133,6 +132,9 @@ struct thermal_cooling_device { struct mutex lock; /* protect thermal_instances list */ struct list_head thermal_instances; struct list_head node; +#ifdef CONFIG_THERMAL_OF + struct device_node *np; +#endif #ifdef CONFIG_THERMAL_DEBUGFS struct thermal_debugfs *debugfs; #endif -- 2.43.0