Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1585093ima; Sun, 21 Oct 2018 15:33:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV60I9XY4pshzZkUN8RGMsthGDux2OWIlNSOaWHJAhhtwr1HRZce61M4ago11vcXnncpoPnhW X-Received: by 2002:a62:8f:: with SMTP id 137-v6mr42900744pfa.24.1540161221225; Sun, 21 Oct 2018 15:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540161221; cv=none; d=google.com; s=arc-20160816; b=vUdK645ePrG0Pf84RCEa7fwMpQi8kdwWljLDXmiJKo1/g+DjAn8KGUTh8pMINXEHDy zUk0etCtvxHfZhdunu/xaF/m3rKloKVyLVCwLBbPU7C5GylWUfU9Y1z+6AmK9GKcaq6S mrs2j7Hjechyp7XFjL1GYD/BBOF7oNDwDBgr082j3UIl1erfZc0OFZapxbFfMHf0sj3f YUGWD3wjUouKZwGY9/R/IXM2YU5R8wS6NiHsUdPM+ExkZjhgc3MGluPQ/TMmNuoqHlqx GmVoepMyN81Exhf2ONRKjQOmCec5tCWRULbBw4fGvGyUv+G//NmbqUeXsj3hHhVnDkBg +gqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jqd/LxnSjl54mbr96LKLlDth5CqjXTmuWw30rjS35f0=; b=Cr7qVsO6lCrEapAyQKNabSf0m2igFp8mDr8xeSdtY5RnGtO58WGNFDIy64hcokBwhC FOtIXFRE9l6A64i8Dal+dfeheDYz8Aj5wZn814j85f0jSaJ14cWSVpbMKRlFJ6bOxyDg NkHgowwV0AzzBeOb7PKog+jNUdjPf5I+++6rSZr++yUncjpYIHg2+B+n0TT5PlV6Cpdi n5Zc8PzYUZrpkGPxNBVo20BMH+Cq+/d7sS7v44/0Ons9zbLZRFMvaBqnfAtIPkjOvbVL O1QhuS5WQT1FP7EEOZzu9gXUXlFsIGBocQd9tNblC/f7LaKcKyzFeXBNDfW1fWRAyvcz W6Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1Yj1CNqS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11-v6si13220078pla.408.2018.10.21.15.33.25; Sun, 21 Oct 2018 15:33:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1Yj1CNqS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbeJVGOt (ORCPT + 99 others); Mon, 22 Oct 2018 02:14:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:57956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbeJVGOt (ORCPT ); Mon, 22 Oct 2018 02:14:49 -0400 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 Cc: geert+renesas@glider.be, pmladek@suse.com, matthias.bgg@gmail.com, linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Matthias Brugger 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.19.1