From patchwork Sun Feb 5 21:03:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 724287 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vGjmx2W7Zz9s7D for ; Mon, 6 Feb 2017 08:05:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="HT+6Qsq6"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbdBEVFd (ORCPT ); Sun, 5 Feb 2017 16:05:33 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34991 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170AbdBEVFb (ORCPT ); Sun, 5 Feb 2017 16:05:31 -0500 Received: by mail-wm0-f65.google.com with SMTP id u63so18063853wmu.2; Sun, 05 Feb 2017 13:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uZiZq76GldKEFTHQR2meiS6AuQ+UNkWJIEhrQD0xiuw=; b=HT+6Qsq63I0GOLKgl+Yy9IQ6PyStfH5+uoUBT/GATBv8qg+J51cIq5Of+tvKlrqcXR qJmreHaEDcbX2caiGTuJqvDDVhsAUPFl0h3XGz7p5APKFxNIR4WS9GtGmr0T1AijDMYH i/+Rn5MqvP6dXcd/i5Qk2uNTlSeY3TkKJzQYJLJcEvr08mAQ/U8OGhDjMBHTm2uXsE6l jyX3vcyWX5plIPcllMV77lDfPmTkfvL3xZAnub5u62nWJamhbouoifgPXFiOgFu9D7LI OMXexNEQb8v9sBxeFS4k4cnykENuZLzPcS54OCrd8uAmtim/19SOAGg2j3yDTgX80eQ5 94HQ== 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; bh=uZiZq76GldKEFTHQR2meiS6AuQ+UNkWJIEhrQD0xiuw=; b=nzArcMxbDm/Aum1id4fND4NHzslYQdQiZMbx1KgZgUFhMoAPFm47S1HOFihTN4Y7cd 1pWkfm948WPNIaL1eqcJ2IentdEaShE2qDxVf7sW2zXofvUAaxzCzTNCAdp9THJAY5uK YUPP0GICfsoI/lvjcik7IA7aAcVHme4L/2bJ/aFMjjF6imaIWXoiwD1827POyW+NjPvh vkWsFdldS49VwL7TA6tm/tiq4Bdcd94ps2Ywv8FGsklnWAitWsAoFrH+n56AOFrl/yi0 s2+D2oZDhbhrBLJer4gsypIqHoGWt7W4n1UWsiAewleWjWPbOnJpxLCqtldBEW9RW9J3 00HQ== X-Gm-Message-State: AMke39kjvxWdNOCdnPh4YRYY9PC1wOTKdOhOQHmHdg8gLYugZ2yMR/nLqwx3kRuoENq1oA== X-Received: by 10.28.24.5 with SMTP id 5mr5764975wmy.1.1486328729458; Sun, 05 Feb 2017 13:05:29 -0800 (PST) Received: from debian64.daheim (p5B0D7CCE.dip0.t-ipconnect.de. [91.13.124.206]) by smtp.gmail.com with ESMTPSA id r6sm9184643wmd.4.2017.02.05.13.05.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Feb 2017 13:05:27 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.89) (envelope-from ) id 1caTxs-0002Dv-AF; Sun, 05 Feb 2017 22:03:16 +0100 From: Christian Lamparter To: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org Cc: Christian Lamparter , Mark Rutland , Rob Herring , Jean Delvare , Wei Ni Subject: [RFC 1/2] devicetree: add lm90 thermal_zone sensor support Date: Sun, 5 Feb 2017 22:03:15 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch updates the LM90's devicetree definition to include the #thermal-sensor-cells property as well as the sensor constants in include/dt-bindings/thermal/lm90.h. Cc: Wei Ni Signed-off-by: Christian Lamparter Acked-by: Rob Herring --- I'm aware that there was atleast one previous attempt to add thermal_zone temperature sensors for the LM90 module. This was discussed on: This RFC is meant to get it going again. As I would really like to have this functionality for the Netgear WNDR4700. This router uses a G781 to measure the SoCs temperature in order to regulate a TC654 fan-controller. --- Documentation/devicetree/bindings/hwmon/lm90.txt | 6 ++++++ MAINTAINERS | 1 + include/dt-bindings/thermal/lm90.h | 12 ++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 include/dt-bindings/thermal/lm90.h diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt index e8632486b9ef..97581266e329 100644 --- a/Documentation/devicetree/bindings/hwmon/lm90.txt +++ b/Documentation/devicetree/bindings/hwmon/lm90.txt @@ -33,6 +33,11 @@ Optional properties: LM90 "-ALERT" pin output. See interrupt-controller/interrupts.txt for the format. +- #thermal-sensor-cells: should be set to 1. See thermal/thermal.txt for + details. See for the + definition of the local, remote and 2nd remote sensor index + constants. + Example LM90 node: temp-sensor { @@ -41,4 +46,5 @@ temp-sensor { vcc-supply = <&palmas_ldo6_reg>; interrupt-parent = <&gpio>; interrupts = ; + #thermal-sensor-cells = <1>; } diff --git a/MAINTAINERS b/MAINTAINERS index 5e637e2b3ff9..8c2ea8a18064 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7541,6 +7541,7 @@ S: Maintained F: Documentation/hwmon/lm90 F: Documentation/devicetree/bindings/hwmon/lm90.txt F: drivers/hwmon/lm90.c +F: include/dt-bindings/thermal/lm90.h LM95234 HARDWARE MONITOR DRIVER M: Guenter Roeck diff --git a/include/dt-bindings/thermal/lm90.h b/include/dt-bindings/thermal/lm90.h new file mode 100644 index 000000000000..39d90f3e63ee --- /dev/null +++ b/include/dt-bindings/thermal/lm90.h @@ -0,0 +1,12 @@ +/* + * This header provides constants for the LM90 thermal bindings. + */ + +#ifndef _DT_BINDINGS_THERMAL_LM90_H_ +#define _DT_BINDINGS_THERMAL_LM90_H_ + +#define LM90_REMOTE_TEMPERATURE 0 +#define LM90_LOCAL_TEMPERATURE 1 +#define LM90_REMOTE2_TEMPERATURE 2 + +#endif