From patchwork Tue Mar 26 11:18:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Havelange X-Patchwork-Id: 10870893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 138031669 for ; Tue, 26 Mar 2019 11:19:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00A9C28608 for ; Tue, 26 Mar 2019 11:19:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8AD82864B; Tue, 26 Mar 2019 11:19:20 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 8751A28608 for ; Tue, 26 Mar 2019 11:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbfCZLS6 (ORCPT ); Tue, 26 Mar 2019 07:18:58 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:36554 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbfCZLS5 (ORCPT ); Tue, 26 Mar 2019 07:18:57 -0400 Received: by mail-ed1-f67.google.com with SMTP id s16so1139445edr.3 for ; Tue, 26 Mar 2019 04:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=essensium-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UPeXZ4AAarS9G3G4HeyW+y4EGQai6OsoJ0Zh24Hq7BU=; b=X4KumO0FhuZnqz+UjV7ZkLxXo2ABbK+SzEKUQEv9TwvjKA4fxLZ0JXGd2O3WB4YXC4 u4qkRnuIvBhWvmKR8Hq3hr8S0/aQ0E+Juh0AR5pDD0rxYRqku2Q4ZwO9T6pdkkOKk5H4 X803SKfUjOvwofv+JLsJMhqEvzB4hdL5TjZDMM49CyUw6/+Y4gQ+qJl8yB8RHPfL57+o 4hhFEueGAniJK53ywzw6Xsh+9geNUwbpCNRm8spOzbd8ARFNIz/Sp2ET0Exwr6cqZ0H6 J5EnEzP7LCLxFAptMUO9uIecDDiQM457ywkNQ/KdKkX9o+y+5tZ+4URC+M9ZEeQ+Nuwf pkgg== 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:mime-version :content-transfer-encoding; bh=UPeXZ4AAarS9G3G4HeyW+y4EGQai6OsoJ0Zh24Hq7BU=; b=M5hbt4NMQkcY2ZNQA52JxLeMFHKZIu6OrCylxGz6M++BQXpCo9v5gMSHDz025lFqqU waiciwzLVrE1uRNQqN2o1pCutvpHyEqvkcddrSTUOiut7f9TtpHGxd/SXjAYGwMDuIEV +msRh4liORIis7p0ZZkgNEhKkNc1GU4tO3OJXcW1iy4V2Hx7WJuzPlVTDWFQbTy8clHF Bq8KtSKvpfyBqkZu5nXwYMQxheQDfB5lskAQBr21LoANDjbDcaJULoCyPB8kDieF2KBQ 8HvL4ZlNW35Au3w3lCtrWsArukDwFM/ACrttkbJmxfhSzfBCLSqtNYTLW+WO73WL5Owo /FtA== X-Gm-Message-State: APjAAAVOVqZpKrxrEUhBfWcWnvum//P/Jam1NGLM6g8GHdqBvEIBw5Bq +oxNAVaoXG65uX6f9CRT6VUeog== X-Google-Smtp-Source: APXvYqwUy/wnpdzjGcFAw9dxWJVgKcN0+6t2Sb7AXHDZ0vAu3k7zmpiCUuSpBvOPgqrSG1lE4ypDPg== X-Received: by 2002:a50:e844:: with SMTP id k4mr5026287edn.249.1553599135872; Tue, 26 Mar 2019 04:18:55 -0700 (PDT) Received: from ph-ThinkPad-E560.local.ess-mail.com (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id i3sm3842464ejj.46.2019.03.26.04.18.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 04:18:54 -0700 (PDT) From: Patrick Havelange To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Paresh Chaudhary , Matt Weber , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Patrick Havelange Subject: [PATCH v7 1/3] dt-bindings: iio/temperature: Add thermocouple types (and doc) Date: Tue, 26 Mar 2019 12:18:40 +0100 Message-Id: <20190326111842.12399-1-patrick.havelange@essensium.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch introduces common thermocouple types used by various temperature sensors. Also a brief documentation explaining this "thermocouple-type" property. Signed-off-by: Patrick Havelange --- Changes v7 - Merge header and doc in same patch - Doc:add it's a single cell entry - Doc:removed non complete example Changes v6 - Add this file --- .../iio/temperature/temperature-bindings.txt | 7 +++++++ .../dt-bindings/iio/temperature/thermocouple.h | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt create mode 100644 include/dt-bindings/iio/temperature/thermocouple.h diff --git a/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt b/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt new file mode 100644 index 000000000000..8f339cab74ae --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt @@ -0,0 +1,7 @@ +If the temperature sensor device can be configured to use some specific +thermocouple type, you can use the defined types provided in the file +"include/dt-bindings/iio/temperature/thermocouple.h". + +Property: +thermocouple-type: A single cell representing the type of the thermocouple + used by the device. diff --git a/include/dt-bindings/iio/temperature/thermocouple.h b/include/dt-bindings/iio/temperature/thermocouple.h new file mode 100644 index 000000000000..ce037f5238ac --- /dev/null +++ b/include/dt-bindings/iio/temperature/thermocouple.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_TEMPERATURE_THERMOCOUPLE_H +#define _DT_BINDINGS_TEMPERATURE_THERMOCOUPLE_H + + +#define THERMOCOUPLE_TYPE_B 0x00 +#define THERMOCOUPLE_TYPE_E 0x01 +#define THERMOCOUPLE_TYPE_J 0x02 +#define THERMOCOUPLE_TYPE_K 0x03 +#define THERMOCOUPLE_TYPE_N 0x04 +#define THERMOCOUPLE_TYPE_R 0x05 +#define THERMOCOUPLE_TYPE_S 0x06 +#define THERMOCOUPLE_TYPE_T 0x07 + +#endif /* _DT_BINDINGS_TEMPERATURE_THERMOCOUPLE_H */