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: 726589 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 3vKg6201PJz9s7C for ; Sat, 11 Feb 2017 03:15:38 +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="sZeuaUDi"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753326AbdBJQPg (ORCPT ); Fri, 10 Feb 2017 11:15:36 -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: 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 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