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 5CF222F39B8 for ; Sun, 19 Apr 2026 18:22:48 +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=1776622972; cv=none; b=E9zd15LNLrVmqrKizv2WrbzJ6k7hIuI3fWA+KkLE8LAp2dHKQHUWDekPLNut3H4qymO1U0rosvvNlCUy0YemHS5aF4UjgxkYjtOOi30fmrnSV1Fwqb6YjLAUTjRRA82fxyzPro+aYJ5L+ChjlszT4WUW5jPWCv3fkE/1SRCbQpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776622972; c=relaxed/simple; bh=1EZJ/sEXs43bbTva6IXmLEChVaaD4wyyFswaWaokE1o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I0tGlhQF6ZfcIqoQXELqimFQsHV6InbeaGZdoP+bNC4MGCL4q33jGwY4uayd2C9bdHvh0nr0z3kwY4HOWrD+McZljQfiP6A3jn0GEJZBFtcOFrLYTPsAlTEOvr9Mff89b7Ky76be1mB2QrlzWx/HVfm4Fzr42vHPZWNsP4+avi8= 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.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="ZlX9K/RV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AwsOi66O" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63J5AoTv2297344 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-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dkyank9cm-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-qt1-f197.google.com with SMTP id d75a77b69052e-50d8dac6233so38691091cf.2 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=fK39S09sz8Bx1XohjrwrjTyZIJ5OigKRiaNS/aujCYdnnZ//hjaXxKFeD/fCZsj8hP k1XUKG9jBowHDmsxKWDKtrEZdCdiZ+4dWiaFFfeKSu+Pr9AJNsSm1VE8qtAW7atZLI09 68rrawu/id/WWCBLFwx+7SOJMjBAtIALQCvhRbsAQm4CU1racc2d/W3cgKxn94+o6jD8 IBoAIpjVu3lCVF7F2Ivq78YtJBCmm/K/36P3uQ75kMxaQdm1NWLqt9hLDi3fYHAhm72j cTUjOVhq7qZCbpSZpUrhWgQuV+USQer2kDoOTb+QrwyW8kL+8dVGrMuE1FeRDR70xS9O A2RQ== X-Forwarded-Encrypted: i=1; AFNElJ8DqgKZjjg4OAt+KvB/IbXVdSMUZSqEVDJq/5UQY1vPmDATfPEz46+gjYmK/uXbNlARjk/5krvWvRutBg==@vger.kernel.org X-Gm-Message-State: AOJu0YyLxUt428Tiy5xIolF9sxDJevuAhJFLEmTypiUegZpqRLxtAPHQ UWLTLJ0SkRvd5o66iI55xMIMGlx2y6qruHTtROKRjm92J3p2kK4ViWvdT0AnSlOfCwnxzsFSIo8 iuuDVfMS9HQ6B25vK6USgLL3LZURBGX3I0MeciPfnBu1MMx0vUHz9y8obyn6CNv1JRQ== X-Gm-Gg: AeBDiesXewaFO+V1y9STdMQfII2uw5W+M4aUVvLuVbCKWk1xSlF8QP5cftxw/KPVwo1 /A/DdVn++4et0vFdequgQdNjv+5ZseXj0KV+pSGyfSFjECz9MD1KtLs+Aoj8zhW0rnPTRJtmxCj IUXQGdi2fL2DiTmrFJ40kh33X/HLSb3RupCzcf0eS6/J4b4bzXTwd/FXClhDtM2Ml5pRNGXzEEA +svTpzo6YOvrRfk31AsMFeH79yEeNOZWwGNZaUPhHcmbM42K9jjI1tEuheaWKSkVvZqUEmPQIyh NQ1ifQgztKoMk/B+lixiSaBepysqMUa5r/E5tY9268LwdCIci9Xpt/WmWLXkBCbYTau8JnJIpcT OZhGhwlPzQo2W8P/Rg9OkmVV4Ubr+xp3hawvAHx4uow4/7mPP+/sDvmGfHSoE X-Received: by 2002:ac8:5953:0:b0:50b:3831:417f with SMTP id d75a77b69052e-50e36c773b3mr168851681cf.45.1776622966682; 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-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: pQ6UEBhlYW-NrpKYitFubyu4C3VJ3vDY X-Proofpoint-ORIG-GUID: pQ6UEBhlYW-NrpKYitFubyu4C3VJ3vDY X-Authority-Analysis: v=2.4 cv=SNFykuvH c=1 sm=1 tr=0 ts=69e51d77 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=1wpLYamVcWg7q6lobrwA:9 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE5MDE5NyBTYWx0ZWRfX4fAgJ+o+3dhp 1YvZ9ldjUOhNMhm67m/Fqrjc+gl2G12umvjrI92+MaP5qLdVg3rTpovO1k29gBh9IbMEqHjCf3C SQLhs3crZRR9o++dk+9HV3B2RknZ4YbcM9dXcH76YhxT+0+rJ5AAFBQWDa4YPr9r42X7O2rKpRs wCBVzFQHPuf+6eXPCab7FNEIIsY8TkETuflfeRNj/7fyGTyDAiLuOWUYQiVGqReYnNo1FpqP1OL Or8sWilQ3S+8AlwPcgv3ifrH6XF5cYZuq+dEikIPmFrEBn8q5BtPbKKP+4JAveaIW40aKVmTKmj D6iKZRuQKLRtHZ5TquUkawFYWoI0EwW9mLUtK6ceu3B2yg/Ik4VaXaHh2fRPsHRv7NlCbZC/K5t quDykf60zzrNriLQs4KjyQmUNwROU/uiLEazkO3E1Aj+jzlSi5p3eHujCMwqlOHyYqeLeBnzOWU lr5JoGcV5A+ZM9tdMbQ== 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 clxscore=1015 impostorscore=0 phishscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=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