Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2754891imj; Mon, 18 Feb 2019 11:34:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUwlpwtQGHIjWNsJIz7jRD2VnqhTS6eNP0OqZz2kYuW03lmclf1LbwVNqhv1/iwu6EWlJL X-Received: by 2002:a62:b511:: with SMTP id y17mr25843949pfe.199.1550518464811; Mon, 18 Feb 2019 11:34:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550518464; cv=none; d=google.com; s=arc-20160816; b=xAWR23he39O5165BrsTXzXbhhJKyVwHNEU1Xlcf27/DXe5ckbkGXv0sDzG68LF9AIs SllZqYIdsYw/VdXCK0YUuU4F+qdVxKzQOZrHAfZ4gojfKlVWX31Bw8SEJeY+qZqbKgSm okk0blPvITobZa0+RhwoRopnQb25f86QA7GFnON1eHUSg2iH4Wuy/UFe2zdL091nvETU VmQZC0MQ+kPhuZeYVUKRu8cUptqR8TGiAPJR0B/DTOHMelfD/0M8LVKPb5XMui0J6/RT LAvqX0gHXyW/6WDnjU0Ouj+FVFd2NiYW7WFd8t+D3H0EdGPx2bK+kAcVqyrlku7YrxPX OHWA== 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=7qkK84rhf9eI19WkazDOBz4QwYf9dy5ZGSMeUUd/NAc=; b=p8z0gz/P4adxBaOSheYNgJc6LwHjhycP2O/IHgd8OZRXMP+1ZDyBkTwufuf5mXz43N 4SvOvV9tsmCOguR0vJlkwAQtZWcg0wE0TCrGfDb/Rm5b4W3p4phX+EhWPAPIYIMkigUR SnyHQPkWTJxu00uVYwS27GiDjMr6roO6RkzUubQUovalXbLaE2llzS490OmWYu2OrVmK 4HRl05WgyEobu5M6lqrCa8lAiXEBRxX9dXkoT8gRPlIjb8sRi5Vpwef8vknI0169Th3O RQapCYRNuctyRmHObqhfrngQcY0ofcWr3GhunpsEs3+NNDRR7bUy7hwO10ON0Jypbybo 0qCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qqR1Syao; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si13306365pga.91.2019.02.18.11.34.08; Mon, 18 Feb 2019 11:34:24 -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=@gmail.com header.s=20161025 header.b=qqR1Syao; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728918AbfBRTMp (ORCPT + 99 others); Mon, 18 Feb 2019 14:12:45 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39629 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728591AbfBRTMJ (ORCPT ); Mon, 18 Feb 2019 14:12:09 -0500 Received: by mail-pl1-f194.google.com with SMTP id 101so9180041pld.6; Mon, 18 Feb 2019 11:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7qkK84rhf9eI19WkazDOBz4QwYf9dy5ZGSMeUUd/NAc=; b=qqR1SyaoY/706E968CMaFBLiwWsKZDtSII1o/E3olng330+PU+3bMw0SGhQbrS8IfB YPWP6UdXAFokcATLbVnFqrqYbddAwv522Xp+58yO3nbcn5usyOrosvVylnWKcX0Dh3r4 i3EjD8tuYJ5xt5E8oBYpWbw09oGeQNTNr4KuYacfAyVJddJ/A9hHIbY/wAQkBgGQhihA EXSBR9Rx0zQs1tLMRuq2KElr1FDNXVoPNLg7v2PxeA4F2tMQu/Jjh/fiFoLdf0by5W9T li6clDlfH6kWfr5qJ60m4gq7vBZZMGrgI4lQTyIDPh802UntMBIw7XL//54qjj2TgrJF 3Y2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7qkK84rhf9eI19WkazDOBz4QwYf9dy5ZGSMeUUd/NAc=; b=YhK38/rUoNzesYRTmeMrHUfMmsDv/v9cEPYeVVBbuFn9p6wTt+KZgATPoRCOjc9DQN xwactQhkI1ssEiTKsT0rRB56DQ/RAWw2hkCa5lA+iB83nNtCQK1xcadGLJ8LzrAudtNl XHckFoV2dp9z5AgD5VhUS1yCk81DtdxijqHaaoy7kG5U5kraPC1rHKibGUbyV5nLQYfC eaGNZv10tsiCy9qzKKw+ICTx+oCHTMI6OgnNCvHN9hjAb8TghdK+7IRefnxTNSBeCsIn 6RGgYh3S3lv5Zu7GCq+GHbSQVBStWWGvnXxkYwAIHbnp+XHa828+6/b9ayVBASvhoaaN 8izA== X-Gm-Message-State: AHQUAuaVnrce5lWpYq/zG8xoDLgJ3/osug7g4+TyC/aCQjkDD/SZOu3D sKd3IFEL6Kve5nvVRxO72kprB0JO X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr26001683plp.19.1550517127711; Mon, 18 Feb 2019 11:12:07 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id t12sm33189727pgq.68.2019.02.18.11.12.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Feb 2019 11:12:07 -0800 (PST) From: Andrey Smirnov To: linux-pm@vger.kernel.org Cc: Andrey Smirnov , Chris Healy , Lucas Stach , Zhang Rui , Eduardo Valentin , Daniel Lezcano , linux-imx@nxp.com, linux-kernel@vger.kernel.org Subject: [PATCH 06/12] thermal: qoriq: Add hwmon support Date: Mon, 18 Feb 2019 11:11:35 -0800 Message-Id: <20190218191141.3729-7-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218191141.3729-1-andrew.smirnov@gmail.com> References: <20190218191141.3729-1-andrew.smirnov@gmail.com> 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 Expose thermal readings as a HWMON device, so that it could be accessed using lm-sensors. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/thermal/qoriq_thermal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index 472594fca03b..90af4c4caa52 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -11,6 +11,7 @@ #include #include "thermal_core.h" +#include "thermal_hwmon.h" #define SITES_MAX 16 @@ -232,6 +233,10 @@ static int qoriq_tmu_probe(struct platform_device *pdev) return ret; } + ret = devm_thermal_add_hwmon_sysfs(data->tz); + if (ret) + return ret; + platform_set_drvdata(pdev, data); /* Enable monitoring */ -- 2.20.1