Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3637722imu; Mon, 28 Jan 2019 08:13:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN6MWqfTgz7B0C+t4e20Eg1OiwCspGp+9DeQWstgIyAtMY1V9DL6yMA2kKRPdlJ6WwrB+Otl X-Received: by 2002:a63:ec13:: with SMTP id j19mr20223772pgh.6.1548692031276; Mon, 28 Jan 2019 08:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548692031; cv=none; d=google.com; s=arc-20160816; b=VBQNt6HTSpX80edN3kbZUbIJA/0dk1sN3SriA3yqei2fA0mZvTuuoRhcZjSSdP7WQE 9lVe8K4iYCd9H65bGcOObnIuwIn+P1UWXf+nRaouHCIFUktBL64JhqbYMzDdeHLcIlPB 0K7VYJPBK1VqTPu2c4+xRk/hzmZRL61MYlF/otkWOUS7XC2KOwJd5VbO4Spz9FtyqP/h BYsIL8+kGG1mCIP/He86Wrzq1D7lTic85QvtHUPEQMHtRPOILRY9n7rAW2nbiQcIw+cJ MP+gXgwp/YvPCRjQbol+x1HjS9D5Id5z/sJHL3wbOWPkVWW/qW31MK6ks48QBEbQxpv/ tBsg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Daew40et6x3VVAxUKvwKa1G8f/yFB7hj4K+T2baJ6PM=; b=Bkik7AIFjin/JvrFeA5PxkcjxEEgy01MpFfzGlAjO61jDXKshrsMMbb1/cz+Qgw8SH u+nYl00ra+sLr+guvu9e8AjqEpfVXOUkvQbXRzpD4x99u1jOTxrP0CaIpfNxQBvxsmr6 3u82bYpao3MQO6Q30ipEZ5TX88uPaaPxcpRtCZyCJZg06TQcKSY8Ri0gNwEyLpNhd1o1 Fq+mzBrHoy0B38DgnjT/mYhoIJG7btypql8XenG2CjxsrUvwXu+b8t8DeUPE05Jx75wU WKtqhWItpAGdDDj1qA8vcwk4rPozo8SeepkMOPK/Lj0JkTemb5pK7ULTJcZYTcNtoaKo Knaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qoJwx3nm; 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 d13si24519513pgh.196.2019.01.28.08.13.33; Mon, 28 Jan 2019 08:13:51 -0800 (PST) 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=qoJwx3nm; 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 S1732933AbfA1QLP (ORCPT + 99 others); Mon, 28 Jan 2019 11:11:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:38094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732921AbfA1QLO (ORCPT ); Mon, 28 Jan 2019 11:11:14 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 46EC82147A; Mon, 28 Jan 2019 16:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691873; bh=VUnoDsH8E7ok5KKv7jrjd7AfUet+hMtZQ+zOqtdrwXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qoJwx3nmV9P7gog102yQ1E7xIe0W1zSBzAwm67RqtHuwCiak0ugq1etrIs+M75/bR +pXBG+X0Tzk6WXO0iFo52JiJSj3k73HcDl1x22Fmi1rCygkrYPb2mngDojBBUXD5SG leKe8bijF8/bsUnGXO2knsA1kR7b9QyWR23kgyIE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matthias Brugger , Eduardo Valentin , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 244/258] thermal: bcm2835: enable hwmon explicitly Date: Mon, 28 Jan 2019 10:59:10 -0500 Message-Id: <20190128155924.51521-244-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore 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 [ Upstream commit d56c19d07e0bc3ceff366a49b7d7a2440c967b1b ] 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 Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- 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