From patchwork Sun Oct 21 21:58:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 10651647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A3A0109C for ; Sun, 21 Oct 2018 21:59:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0643A2867F for ; Sun, 21 Oct 2018 21:59:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED954286C1; Sun, 21 Oct 2018 21:59:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F4572867F for ; Sun, 21 Oct 2018 21:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UibbyruafVcFIfvpSrZZ9xm5v09+f3BXO54CinOojSo=; b=lYulQ8q8FfB8BD SGf0Wo0tmG5DKZpllaNiIn49TQ4TSU9ejzpD9wop4c45/0fdyo9Z16PU3KSstCW+use9DLUH77Qik LeXhr3gGd1MqFTElF+O1d6TMyN/Z7aee10bDIfgwSKLng3i8myt1vsOAlu3jIZz0OWraaVfD/pY/L P1GHS/NtIyBc6HL0tKo9jPkGg9sDd4+67SUUQb1n/qe0niSjcCkbxMse7O0aH+0cBcGkiaF4/v+lm F9F+cX5VyiChAtCejMdo94kLAUQptDjGL6Qam5Xx4YvSkZ5NPwMtuZsnmHqQ4vajW1LnPwRFcagnj B/Lz5281FONknpk6bA2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gELkj-0003oO-Lk; Sun, 21 Oct 2018 21:59:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gELkf-0003n6-FF; Sun, 21 Oct 2018 21:59:15 +0000 Received: from ziggy.de (unknown [81.145.148.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5FE3020658; Sun, 21 Oct 2018 21:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540159142; bh=G65U0qMMy1th6Ak+fLLQrGtTvMoK7/ZItsWEtDUXTZ4=; h=From:To:Cc:Subject:Date:From; b=1Yj1CNqSst9Dkso8Xg2t5WVWN4NbD6L6vGhJ1tla5wykXwNGDImCWvURdtcJpcffU W+kXbFTnVKEb0QVAXAcBjNf4NaNXDFx9Q5U4+j1NcgOMW8X0Zn0dy5Z2IocFmi2Fr5 ObZU+5IiTyHrBYE6lEzTWG17TMSE5Ku00VZrZhf0= From: matthias.bgg@kernel.org To: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, eric@anholt.net, stefan.wahren@i2se.com Subject: [PATCH] thermal: bcm2835: enable hwmon explicitly Date: Sun, 21 Oct 2018 23:58:48 +0200 Message-Id: <20181021215848.5827-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181021_145913_577036_5FBDD9B9 X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pmladek@suse.com, Matthias Brugger , geert+renesas@glider.be, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Matthias Brugger By defaul of-based thermal driver do not enable hwmon. This patch does this explicitly, so that the temperature can be read through the common hwmon sysfs. Signed-off-by: Matthias Brugger Acked-by: Stefan Wahren --- drivers/thermal/broadcom/bcm2835_thermal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c index 23ad4f9f2143..24b006a95142 100644 --- a/drivers/thermal/broadcom/bcm2835_thermal.c +++ b/drivers/thermal/broadcom/bcm2835_thermal.c @@ -27,6 +27,8 @@ #include #include +#include "../thermal_hwmon.h" + #define BCM2835_TS_TSENSCTL 0x00 #define BCM2835_TS_TSENSSTAT 0x04 @@ -275,6 +277,15 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) platform_set_drvdata(pdev, tz); + /* + * 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; + bcm2835_thermal_debugfs(pdev); return 0;