From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 3E6842F12AF for ; Sun, 19 Apr 2026 18:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776622974; cv=none; b=odv0EuuqY9Z0qz+cLCx/lp1bYdYXGQEyvNkvmb6CBQ3CiRJPljBkljJwViceafVNKwBLWtjoExyb0Bk0QabcWuB3QEKtoY7zBAubJCaAnqtbyEcNyijfvKmPx42JiMjK2WImX7Va7G+dbNtaDotx6JeP+2Nx4qwz0yO+ElXpMP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776622974; c=relaxed/simple; bh=1EZJ/sEXs43bbTva6IXmLEChVaaD4wyyFswaWaokE1o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mY14RNoO1ctVM03Vkc6AZlynbDtlWRiBoBViyxxD48jhyZ5QYpQjZMHjJR2t97qPsOoSDPwzexofBqhAKcbN007QJCnI+gzGjLuJMojagVo4Hblfs5r21orn/HQXOQPfk4og2FuSpmaff3E2qqMdtgRE4l5goomKdB88tpEaS14= 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=ZlX9K/RV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AwsOi66O; arc=none smtp.client-ip=205.220.168.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="ZlX9K/RV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AwsOi66O" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63J9mG3v1843753 for ; Sun, 19 Apr 2026 18:22:47 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=5+FaPlCHs97 hjeDgtr8xUv7bicqdWzWnDvhYFxD5bkY=; b=ZlX9K/RV4K7ZZOXAZiRJu0f4RC6 8M1fINuzlF7+36gLDxgd40+YCs50AnOhem8rY+nPcwr3ZyTJsp7nspp5hUlibtF8 JlAlvUA7Tie3jX0gYd2SfHHytIgU1ZCy7OdJSEr5DzsbNoVQIH0yDEIn6CaYsk6+ ZnDCDBSpk7tVwp+dYqA5eXX1v8bZ7cuZzXGBiPWjCY0eYSKFJNIn7ksk/hXA+rV1 N6joJD/ZM6Q2dX05OkwE2NFH8d1ytcynP/BspS3iHSstOcKDcCT9OGKKuaJxqQ1M IN3E02DKfvLFTdTPgeYsYMxfMWgXEjCsYsZ89UCL/ojMV7M3pdqfmZj1Vfg== Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dm388jxg1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 19 Apr 2026 18:22:47 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-8b0312bb1dcso45775296d6.1 for ; Sun, 19 Apr 2026 11:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776622967; x=1777227767; 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=5+FaPlCHs97hjeDgtr8xUv7bicqdWzWnDvhYFxD5bkY=; b=AwsOi66O981F/StI/ueQEd6oewfOBelQDBSTtStxF+mGquLFa8pCieSorYBCnYg7w7 x8DFCLUT8E5fi/VX/kskD+VclHR898xdXA0zaTlaw0/nObI//vmj8eGvXV2HdRe88E2u D/H86WZo7Th1oyjSWpC8u1ns1pDHe4jn0LFhYOjtTuWtq8jBaMeK8edAd9/oBobq1CUS OIjWQJo0k/FT6fIchjnCWRr88Obe00pK0wnZRrUUmtoUXr/yIxUc+C4zkBRRgbFLRCfG W0VBAZg9xkmgL3Pfo2gTbkTovSXIOrYp3WB4J1x0Z2pz/iD2Z98ICTSR+qC8AsAbiQ4v WSSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776622967; x=1777227767; 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=5+FaPlCHs97hjeDgtr8xUv7bicqdWzWnDvhYFxD5bkY=; b=JrAst/MwBNxLT/UdZPRHKwc2pr144xkWA84nkXiJlBT3P6n5OCk8s1ipQUAoGSDRmc lsAmVkr4p3QTB6eSQrR9lLGgeiNa4zdJYbUeHM3PGLQPVS0T7Hn5fsEDdLH30pCUGD1s xtY0VfmRDrVGHXw3tnnvB8DbMN8OKvLwpGs8OSdUHRp3jJXZ1iXYYrrNLiAfTThFJeo0 q8KdY+4TBi8L0ShkOUeP8l0Vi8vrzTqkMaJSbY4HBu5N4KvLS01rD6O/tiaKxsL9qlF8 UqM653yy3MT4bKjmjClvECERVXpObRWrCXqsrm+PPXXGcX+rH+t13Nice0Miuia1t5mF jmUw== X-Forwarded-Encrypted: i=1; AFNElJ8oYT7Y4tm8/vKrutshjm6fqp8+TBd3cRMd7jin50wzpAJJ0DMYDGA5o/EgWGat70OJ3Bt1XuksHCeiXu4=@vger.kernel.org X-Gm-Message-State: AOJu0YxK1JobAEk71zh8fPAxKPqArU9iepwqU66CeSi0hKf6w713kjzd f/sK2h9SQHNcul9ChaQlbFMawZ6OP3n+mVlINDupnKJ1tb7InikwMUypnbGqajDnF8AerX8PbX5 lQVPPrpWxNuS3nxPYOMZ3hJzk8lTQU3JBomoS1M0PtbSJuX+BaYlovW1WslKVLSsyB+U= X-Gm-Gg: AeBDietJ1YpZpgaQ6NkUQx+TWp/XB8NfDEnPIj2w2/TmH/JvqK7pugzLier5sfj3n1j xV+157feIg0jJxFpRdA65L/3iFYqYrX93A0HBSdnndbspLJSkd6hiBK0wpXmg/V5BVo4yjLf5ed PYTXOg8VZNNbYBNG5xWXLG+smXT/E7fLhU4Hboghng1W3GQfSJQAWiUHBd591tjjCM0JmbeWkrE C6GHxnQ4qOvKgP9PkfTEU6+yV78JU15fbqW89Amv/GKs1FFIKqF2cxkxm51kJeTrglC3W0ZXNFv RnExOlpDMGWXL0tCMjdErI+Zxvrh3W+CDJStyVkO7BXxzdFd674gGsg3/PZdm1u4klVceFLRuE5 VzxCZrjUZ/V978BTU26NMbRfTZWRtwEq62nWJVDcwLDkTvqWIm/sr7aADf0rD X-Received: by 2002:ac8:5953:0:b0:50b:3831:417f with SMTP id d75a77b69052e-50e36c773b3mr168851411cf.45.1776622966658; Sun, 19 Apr 2026 11:22:46 -0700 (PDT) X-Received: by 2002:ac8:5953:0:b0:50b:3831:417f with SMTP id d75a77b69052e-50e36c773b3mr168851021cf.45.1776622966149; Sun, 19 Apr 2026 11:22:46 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2026 11:22:45 -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 08/14] thermal/core: Move OF functions def in the CONFIG_OF section in thermal.h Date: Sun, 19 Apr 2026 20:21:52 +0200 Message-ID: <20260419182203.4083985-9-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-Authority-Analysis: v=2.4 cv=GthyPE1C c=1 sm=1 tr=0 ts=69e51d77 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=1wpLYamVcWg7q6lobrwA:9 a=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-GUID: fn-VPRSFdnDAASFD2n7YY6DhDUL5lY7l X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE5MDE5NyBTYWx0ZWRfX7rRxk1OPd6zf /n/cl2Zde1KJkD5C4V1EB53TJeIApFReIXCcKCTWYf9P9xm1GABj8YjlhTw0c/l5ZZVOirgeIfb FK+qzPejfN6PhEp8BJH02p62+i4mfkEMcg0jYxa1TNJuRil5PFbVe96g/9Qc1SZ5Aqd3Qu3//Sj 96f6ivLMFJ4zU5hipCyDzdgni3KjB+CAmcpO4mohkhIdUN58+HsyYWMLauj7O1i0L4vN496e3Iv 7rLjy2+9hXmu0BAeEOSd6D/sKWcImEbmA06DNNVl0F6xBzAtHLpB/tesDUeB0slZxAelB4qFFyi CML5zKpdyYXR8X/1JfHCM9knU4/xhxKebeP7HLBCu0hnhJuBb+B2ObNgMRWEPlHzPO9WWn8da0M NxpufrfchHgV1+mOddexAD6IZssY9X0wmRFO+w5vcXqgi+q74jok/qs1/hPuv6S8ELdEOea9MGt 6QfQJrSEYQwi8CRnWqA== X-Proofpoint-ORIG-GUID: fn-VPRSFdnDAASFD2n7YY6DhDUL5lY7l 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 impostorscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 spamscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604190197 Now that OF functions are used only by OF drivers, let's move and group the functions definitions under the CONFIG_OF block. There is no need to keep them out because of non-OF drivers using them. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 48 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index d9332b037188..f7b8651c1ed0 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -198,6 +198,16 @@ struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, in void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz); +struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + const char *type, void *data, + const struct thermal_cooling_device_ops *ops); + +struct thermal_cooling_device * +devm_thermal_of_cooling_device_register(struct device *dev, + struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops); #else static inline @@ -211,6 +221,23 @@ static inline void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz) { } + +static inline struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return ERR_PTR(-ENODEV); +} + +static inline struct thermal_cooling_device * +devm_thermal_of_cooling_device_register(struct device *dev, + struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return ERR_PTR(-ENODEV); +} #endif int for_each_thermal_trip(struct thermal_zone_device *tz, @@ -252,14 +279,6 @@ void thermal_zone_device_update(struct thermal_zone_device *, struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, const char *, void *, - const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -devm_thermal_of_cooling_device_register(struct device *dev, - struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops); struct thermal_cooling_device * devm_thermal_cooling_device_register(struct device *dev, const char *type, @@ -309,19 +328,6 @@ static inline struct thermal_cooling_device * thermal_cooling_device_register(const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } -static inline struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ return ERR_PTR(-ENODEV); } -static inline struct thermal_cooling_device * -devm_thermal_of_cooling_device_register(struct device *dev, - struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ - return ERR_PTR(-ENODEV); -} struct thermal_cooling_device * devm_thermal_cooling_device_register(struct device *dev, const char *type, -- 2.43.0