From patchwork Fri Feb 10 16:12:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 9567041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C510B601C3 for ; Fri, 10 Feb 2017 16:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1EE1285A4 for ; Fri, 10 Feb 2017 16:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6C82285A7; Fri, 10 Feb 2017 16:15:36 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 291B0285A4 for ; Fri, 10 Feb 2017 16:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752523AbdBJQPf (ORCPT ); Fri, 10 Feb 2017 11:15:35 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33194 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbdBJQPD (ORCPT ); Fri, 10 Feb 2017 11:15:03 -0500 Received: by mail-wm0-f65.google.com with SMTP id v77so8026206wmv.0; Fri, 10 Feb 2017 08:14:42 -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:in-reply-to:references; bh=e3iy0mUyi6kRpzof3+J42jrdMoWInFQKsdI8azX2muE=; b=sZeuaUDiwGWcbF+KEz5QRbQRppXwJfZMrk63It7PwwpR0CUbNwghy/1U0+yLRO7qUv KbsTCYD7vpZSMHVkPskMdcHbru1Fhrclz+m8Ftta/Iq6kZxwrwvYfaz1/Ak2fFgKvnxx MI08x20Zzvp87HG7IMQtvgbuA3v+QQ9G9Bd4mVQNWPtV3MEVhN23IxKDloj5QPiBzo3t SugwAHxcrOU0X07vPokH8kqx0TULjjL72Azd47G+3mZXALNiXiOE7sIWczBcVN77MNV3 /ObvNPwGL/GVmMlRKevmzJibJaaDbilMr/3sSaFVXfomeXPyvh1rxBryhxeLFNgvoKRo k/JQ== 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; bh=e3iy0mUyi6kRpzof3+J42jrdMoWInFQKsdI8azX2muE=; b=mDTHEsXAX8Pe/qoPd9CK5hSY2YtMDXbHPKQljC6dTFB1rHb2pXthKkTtJtEBata2nR hFu9t6jtGDZmpKFVU4WVNAx5LCpGX5kTG9nxHdxaaioXiFU1BDkLjxVgYyWl8X7sffnQ k28B4d+xPTDZHZ2ZCeTxTx4d1JUL3wxDlt/SxLI8vsx5q4t8Gwktd+WGLPKFl+IdMNyZ RzW9IEdDlmDLbT8ykcGBD5bgbz/BN0PqIbbSFdoOlV0uOfMcUtKYwO9w4VhPisKybJ05 zXPA9CCoXZL1Jx/7zeESR6bOKKUo/o7UY8cIsUG/SnOfsGiooLEWK3RYn5bclB8ePULS 98LA== X-Gm-Message-State: AMke39ktODTwwpFHcZBk9LybnklixK6irpWuC+3YqSX2PR27dcIKZQkTDpHFpx6ilECh6A== X-Received: by 10.28.214.137 with SMTP id n131mr7671697wmg.120.1486743281337; Fri, 10 Feb 2017 08:14:41 -0800 (PST) Received: from debian64.daheim (p5B0D7F2F.dip0.t-ipconnect.de. [91.13.127.47]) by smtp.gmail.com with ESMTPSA id b10sm501692wmi.34.2017.02.10.08.14.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2017 08:14:40 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.89) (envelope-from ) id 1ccDoE-0004id-6T; Fri, 10 Feb 2017 17:12:30 +0100 From: Christian Lamparter To: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Jean Delvare , Wei Ni , Guenter Roeck Subject: [PATCH 1/2] devicetree: add lm90 thermal_zone sensor support Date: Fri, 10 Feb 2017 17:12:29 +0100 Message-Id: <0d274e32ad09daa2f6f7f27f1c36d39da526b66d.1486741517.git.chunkeey@googlemail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <2979642.2YCYMDeKdL@debian64> References: <2979642.2YCYMDeKdL@debian64> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Rob Herring Signed-off-by: Christian Lamparter --- I've reordered LM90_LOCAL_TEMPERATURE and LM90_REMOTE_TEMPERATURE. Everything else is the same as in the RFC. This is the only required patch and it only updates the documentation and binding. [PATCH 2/2] is optional (as I said I would look at it). --- 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 2be620cea1ed..73972ccebc56 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..8c2e3095f704 --- /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_LOCAL_TEMPERATURE 0 +#define LM90_REMOTE_TEMPERATURE 1 +#define LM90_REMOTE2_TEMPERATURE 2 + +#endif