From patchwork Tue Feb 21 18:06:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 13148261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89CFCC636D7 for ; Tue, 21 Feb 2023 18:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZxktOHsFOeUdWE5+jmOm55tFCfs/Z1k6sRw1modXQlM=; b=O8jxNVFi5UtssQ foicOlp19QSgHByD7r8h2knpedjxIIIRiu9kkI7i2MT5Bagb9hxO+zueDxlvfG+/0D1jKGRtcPnEh 5fBDwMNs10XND6B2iHHlzT/672i9WGZmjiilRZy+4G094Sa68k3X4/x+/cFipRQzZ87fh8ejDzMvl b8th7RMT4sT4uVHbuVd8NQGSZF0mYDzclVAYU7AlKWLg7U192eb8tAfJzdSB5TKn0KufwgBvvFpIm PxsaaBic1H7oRKpHQQYBtuVtPAhro01+rg9dor2VdgS4UzhIsA0E1WfZITAN23UeL/Fbg3eJRjSnL SSNdgtxpvx1wuoenOkJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUX3S-009IMS-4C; Tue, 21 Feb 2023 18:07:54 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUX3J-009IHm-LX for linux-rockchip@lists.infradead.org; Tue, 21 Feb 2023 18:07:52 +0000 Received: by mail-wm1-x32b.google.com with SMTP id l6so3877005wms.3 for ; Tue, 21 Feb 2023 10:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=d1kZW3/M8hlSrhTNIbSXakvC4ON0rMLSasQAq1vDfbY=; b=W14kchqFYP+9MoZWrMYBBI/Pe33uOzlP/bI03g4oRDwEHVp8pFHzsu3a9bpMgPrco5 nCXO70dTQWToQGbR79D+X+4DK+0y97eBhpOHkUHR7J1gSlGc/AIoS/RXoqruZOuEXj81 zOdZyXxnNKa4qyZLrCXFDJp8t8/8CY79/W6QPjeFhNXlXz+KfGAIyh2A7qiCvcB9p0Zz nJNs7l+h/L2BSGjRZYyNkZVgP3XwO3X3F2q/ocy7faJ72l2FBX2c9tWt7h5Tq/AxtgNd BQAJKHCI/kCeGzGXW6629DGui2oABbfDbvO36KHmvB1vtsEUHnpIIgdQpV82rNiglPW5 1H8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d1kZW3/M8hlSrhTNIbSXakvC4ON0rMLSasQAq1vDfbY=; b=2RgQC72zdT3xk6EYpCXw5dkWcO+wTh2JFW38IvqUkuyN1qyrbCs8D5usAR0TRTNTtd 2oSkgksazGNctG0mFlEuW8fNv+a/uyOrOf4rbPW4xhMyWqpAaOp2iar73vwDF1Enaks9 M66s7Gfiu6jz9xFSKp6ykO5abceWPqJwTg6O/PwtharfzUP8AZdpihNvLhRMUu+IneJz idDaYVh4iXPM/nwIwPmDvJfUSjnIWUOQHtHivPtMcvtXALFnvSmSB05LYIhCu8X7dvve akZxBy2196n9Jsco2DwlUGK+lWjnhHTj/gBHbgNRWi3wfl77JWzFRb4u390E7a+Kmdiz u+LA== X-Gm-Message-State: AO0yUKUTK+uM/qqlWzMXLGHesNXc3m0awxpeyLbGQje4y0bsoLK7PZjd 5ixZVbfA17LQwizUkwO/bP6y5g== X-Google-Smtp-Source: AK7set9I7QAEBq3KVMS9IUSAWCfudZtuhtkP5HXBO7Fhk5i7l2n1Od8rPRrU3Yej5CI9SbV0Bs6DNQ== X-Received: by 2002:a05:600c:2ed3:b0:3e2:1fa6:f418 with SMTP id q19-20020a05600c2ed300b003e21fa6f418mr3989284wmn.23.1677002864409; Tue, 21 Feb 2023 10:07:44 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:1e9:315c:bb40:e382]) by smtp.gmail.com with ESMTPSA id c128-20020a1c3586000000b003e21558ee9dsm5107815wma.2.2023.02.21.10.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:07:44 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Niklas?= =?utf-8?q?_S=C3=B6derlund?= , Amit Kucheria , Zhang Rui , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , =?utf-8?q?Niklas_S=C3=B6derlund?= , Heiko Stuebner , Baolin Wang , Sebastian Reichel , Stefan Wahren , Mark Brown , Balsam CHIHI , ye xingchen , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-renesas-soc@vger.kernel.org (open list:RENESAS R-CAR THERMAL DRIVERS), linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support) Subject: [PATCH v2 04/16] thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() Date: Tue, 21 Feb 2023 19:06:58 +0100 Message-Id: <20230221180710.2781027-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230221180710.2781027-1-daniel.lezcano@linaro.org> References: <20230221180710.2781027-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230221_100745_765860_AA6ADD17 X-CRM114-Status: GOOD ( 12.79 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The thermal->tzp->no_hwmon parameter is only used when calling thermal_zone_device_register(). Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no effect. Remove the call and again prevent the drivers to access the thermal internals. Reviewed-by: Niklas Söderlund #R-Car Signed-off-by: Daniel Lezcano Acked-by: Florian Fainelli #Broadcom --- drivers/thermal/broadcom/bcm2711_thermal.c | 1 - drivers/thermal/broadcom/bcm2835_thermal.c | 1 - drivers/thermal/rcar_gen3_thermal.c | 1 - drivers/thermal/rcar_thermal.c | 5 ----- drivers/thermal/rockchip_thermal.c | 1 - drivers/thermal/rzg2l_thermal.c | 1 - 6 files changed, 10 deletions(-) diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c index fcfcbbf044a4..c243a76a3471 100644 --- a/drivers/thermal/broadcom/bcm2711_thermal.c +++ b/drivers/thermal/broadcom/bcm2711_thermal.c @@ -98,7 +98,6 @@ static int bcm2711_thermal_probe(struct platform_device *pdev) priv->thermal = thermal; - thermal->tzp->no_hwmon = false; return thermal_add_hwmon_sysfs(thermal); } diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c index 86aaf459de37..a217d832f24e 100644 --- a/drivers/thermal/broadcom/bcm2835_thermal.c +++ b/drivers/thermal/broadcom/bcm2835_thermal.c @@ -267,7 +267,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) * Thermal_zone doesn't enable hwmon as default, * enable it here */ - tz->tzp->no_hwmon = false; err = thermal_add_hwmon_sysfs(tz); if (err) goto err_tz; diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 2b7537ef141d..3df00c9d55ab 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -527,7 +527,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) } tsc->zone = zone; - tsc->zone->tzp->no_hwmon = false; ret = thermal_add_hwmon_sysfs(tsc->zone); if (ret) goto error_unregister; diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index e0440f63ae77..b8571f7090aa 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -509,11 +509,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) } if (chip->use_of_thermal) { - /* - * thermal_zone doesn't enable hwmon as default, - * but, enable it here to keep compatible - */ - priv->zone->tzp->no_hwmon = false; ret = thermal_add_hwmon_sysfs(priv->zone); if (ret) goto error_unregister; diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 71e533df563a..bb254bdff043 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1451,7 +1451,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) for (i = 0; i < thermal->chip->chn_num; i++) { rockchip_thermal_toggle_sensor(&thermal->sensors[i], true); - thermal->sensors[i].tzd->tzp->no_hwmon = false; error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); if (error) dev_warn(&pdev->dev, diff --git a/drivers/thermal/rzg2l_thermal.c b/drivers/thermal/rzg2l_thermal.c index 7631430ce8a9..b56981f85306 100644 --- a/drivers/thermal/rzg2l_thermal.c +++ b/drivers/thermal/rzg2l_thermal.c @@ -216,7 +216,6 @@ static int rzg2l_thermal_probe(struct platform_device *pdev) } priv->zone = zone; - priv->zone->tzp->no_hwmon = false; ret = thermal_add_hwmon_sysfs(priv->zone); if (ret) goto err;