From patchwork Sat Oct 31 13:40:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320064 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2268320ilc; Sat, 31 Oct 2020 06:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT2M7CHMz3X7eplygzX99J0nl6xYqt4xTgEtp9K4m+IxeBWrf33y7CV14vum8vJZPvQBj6 X-Received: by 2002:a50:9e69:: with SMTP id z96mr2846339ede.226.1604151835570; Sat, 31 Oct 2020 06:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604151835; cv=none; d=google.com; s=arc-20160816; b=Veal9BijXmeCSBfjUx5i/d6rB5XJuuiV1XXmZzzlWafGG2oUZ9bpB1bUtVqH6D7EkA 5glnaGZlX56kTXylKV+lxETL4eBi9ZMDgwKgKCK5CgI7VThatClWFADl/e2b+tUB6z1i DgN6z/3RMQWKWYiXB6e6EXf8dKyKAbQRLzezcvQntBxUYJZpIwQff1Kse8LhlXoRNxnC YWYAIemfwH+8/zZmRQeKpevxZYpFmSlcogRwWQV+EiseV/6pme9E9oiQmxKTc+jDIN1S SPptqkGaDjzEjqUhI97mr3PkEnO01c0hqF/kucELCGWs4rvH6jycBARHdKSL29QOtK0M jWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tKMyufLdzAnJPkSMYUkiwVPAEHt16v3l8UOfqTcfZms=; b=Il7YgPYQ98ZV7htsZh/4iLc2szvRedcP/vXIlEa+2+prk5tCHWcIVvp6OP2btEwVTu Aect9+6EDItE4FSi3dQLDV8KM1aFYJHVv8avfd2gdlV9Rq1jEwOfuCpS/jSkeNeK5Sbo TdbUtS/ctF8TKHshIWa++UbePKoEJHbSMBBmXVvXYzN35Gi7ifXfvp+QhCLMBijoiDfd ZdrJ4ZSJZQW+EHivyljcttkr/f7znIF7GoptvfXHJs2TP+THqyGfmH2Bn34kteQel9hT z3S4tcapZgG98zCKCEQM0yc6xdNJagowL6wp4tQ9s1poM1LcaU87YQUsLoIRtCJiBrlx gU1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sl2vrPWo; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si6243872ejc.209.2020.10.31.06.43.55; Sat, 31 Oct 2020 06:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sl2vrPWo; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbgJaNnr (ORCPT + 6 others); Sat, 31 Oct 2020 09:43:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:42696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727589AbgJaNnq (ORCPT ); Sat, 31 Oct 2020 09:43:46 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B58C20853; Sat, 31 Oct 2020 13:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604151825; bh=+uTLtslO2QQtK4j3mW/JF0QgRnEKn9Jp/R0CuC672K4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sl2vrPWoaD4RA8lpf5U0cOZINgcCGWkQVfaVCyTOKyHorvMpAK893KCf99a7k5wWQ 1P6np/50rQJLz9ekfP7UxX62baQyFNi9C+kL3WgnynT5DfU/1wg76AEEQ2DjGaEQz2 xyRFbyoLlq92vxOnfnzEAA56+9NTIcCoq5wY6zHw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Rob Herring , Lorenzo Bianconi Subject: [PATCH v2 03/29] dt-bindings:iio:humidity:st, hts221 yaml conversion. Date: Sat, 31 Oct 2020 13:40:44 +0000 Message-Id: <20201031134110.724233-4-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031134110.724233-1-jic23@kernel.org> References: <20201031134110.724233-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion of this temperature and pressure sensor binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lorenzo Bianconi --- .../bindings/iio/humidity/hts221.txt | 30 ----------- .../bindings/iio/humidity/st,hts221.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 30 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/humidity/hts221.txt b/Documentation/devicetree/bindings/iio/humidity/hts221.txt deleted file mode 100644 index 84d029372260..000000000000 --- a/Documentation/devicetree/bindings/iio/humidity/hts221.txt +++ /dev/null @@ -1,30 +0,0 @@ -* HTS221 STM humidity + temperature sensor - -Required properties: -- compatible: should be "st,hts221" -- reg: i2c address of the sensor / spi cs line - -Optional properties: -- drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share the same - interrupt line. This is a boolean property. - If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or - IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line - when it is not active, whereas a pull-up one is needed when interrupt - line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING. - Refer to pinctrl/pinctrl-bindings.txt for the property description. -- interrupts: interrupt mapping for IRQ. It should be configured with - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or - IRQ_TYPE_EDGE_FALLING. - - Refer to interrupt-controller/interrupts.txt for generic interrupt - client node bindings. - -Example: - -hts221@5f { - compatible = "st,hts221"; - reg = <0x5f>; - interrupt-parent = <&gpio0>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>; -}; diff --git a/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml b/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml new file mode 100644 index 000000000000..396451c26728 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/humidity/st,hts221.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HTS221 STM humidity + temperature sensor + +maintainers: + - Lorenzo Bianconi + +description: | + Humidity and temperature sensor with I2C interface and data ready + interrupt. + +properties: + compatible: + const: st,hts221 + + reg: + maxItems: 1 + + drive-open-drain: + type: boolean + description: + The interrupt/data ready line will be configured as open drain, which + is useful if several sensors share the same interrupt line. + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hts221@5f { + compatible = "st,hts221"; + reg = <0x5f>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; + }; + }; +...