Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1120014yba; Sun, 31 Mar 2019 23:18:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV0qYC7g8HakCLtq32kW2x9JtAnX7Buumnq+1Ldmq5kEgOQWQQXeoaSGTJeAlo6sWehDqZ X-Received: by 2002:a17:902:e407:: with SMTP id ci7mr3452995plb.219.1554099501981; Sun, 31 Mar 2019 23:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554099501; cv=none; d=google.com; s=arc-20160816; b=llHARjQkkKhsgmgpXyLJZE4GlvXJw7RxIQ98YJAgCgVMAls5LW783ICvfeFT8il3Ni MIMf5FY7+zso8+Oj6j/crQMwSwGUSgk6Ai9+eTmF40jC3Rp5QPrSJQ9BiStkwc4gjXQC 2GnNuFlyVt9qZ3kUr3MBL3MVamaDJIG/GENcVlQhyuM6gxOLzhsiCW2Uoa4JY+6Y7jrR ts/jWx3FQeYBrGy7OmooOylMYJ+l3kgld3P6CaAeow4BVSIlS9IayulCGlTjnqS7W5XP otbZSfhnqxLQrIJqwYUYx+Jm2hKHXgsDg5wnkGAKRSIcufM91qAA1aS/LjtDQbniBLe0 WTlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bcbVVGFIDk651cJzGZcdbE1nRcv0ccAGYwSLDTCXEVA=; b=cec0lyiXo8QI+3oZbkiqPzpH2QEm/lywIu4+GExZjSVNnAP5aBXJBXJG6qDVfC2zhk V4zGOvkJFV74hnqhEo2UuYVW/LJlcVTfAn3cbodNffYFUEcLAFZWcN1rvUZfI7kR7uOy iZFRGd76I9Jz7G9pJQJ5ufpVTuMR557HgYoNUoKBx7arkpdifH8t09FDoFXDzs9N8i9f R3LNbQt/3GOgE+z3turmUy48EmbsNq23soOg8cRwBWyhauK1FTkwwOVTnSaKtO2MBpxa h56GhfxCJyv3Mlupq+/xef4nmTvZmoHheLMFT/7Cq0ZIhnASoxxUzGIYlo2ET67of6hz pBCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SfxMmEZN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id 5si8177891pgg.505.2019.03.31.23.18.05; Sun, 31 Mar 2019 23:18:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SfxMmEZN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727076AbfDAGRa (ORCPT + 99 others); Mon, 1 Apr 2019 02:17:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:59584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725784AbfDAGRa (ORCPT ); Mon, 1 Apr 2019 02:17:30 -0400 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 D4E5520896; Mon, 1 Apr 2019 06:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554099449; bh=qAxsK83Y1E8BjJeMAKQuophDBP/wZFhiTPSMxBrviBg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SfxMmEZNQNoX+06pp66GrG5dw838/zsOmLP83bFOt4qnkjZx75B1fb4hH/3ra5WUR BwpXFw1ttdy78ziDlyO9jfRpCbnq1A7hMMtu18uBG8c0r1htdmDw1dM1EfiSwOVCB0 JAQuFqLJG5rPbKo12pr+eh/pN4ZNA189wVpSXSnA= Received: by mail-qt1-f174.google.com with SMTP id z16so9496321qtn.4; Sun, 31 Mar 2019 23:17:28 -0700 (PDT) X-Gm-Message-State: APjAAAXslC+jv9CcxgE5d4i2BC8R6uD02541akvvEk5JZ2eqNlH04/+W fKGCQmP2p5U0Cw5kv5nzAGCNqlFwSsLu8Mlt2g== X-Received: by 2002:aed:35b0:: with SMTP id c45mr52888123qte.144.1554099448033; Sun, 31 Mar 2019 23:17:28 -0700 (PDT) MIME-Version: 1.0 References: <20190331164753.xifw6kkiwdg4xpzo@arbad> In-Reply-To: <20190331164753.xifw6kkiwdg4xpzo@arbad> From: Rob Herring Date: Mon, 1 Apr 2019 01:17:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] bmp085.yaml: transform DT documentation of iio sensor into YAML To: Andreas Klinger Cc: Jonathan Cameron , Mark Rutland , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Brian Masney , "open list:IIO SUBSYSTEM AND DRIVERS" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 31, 2019 at 11:48 AM Andreas Klinger wrote: > > use bmp085.txt and change it into yaml format > > fix links to datasheets in replaced documentation > > Signed-off-by: Andreas Klinger > --- > .../devicetree/bindings/iio/pressure/bmp085.txt | 27 -------- > .../devicetree/bindings/iio/pressure/bmp085.yaml | 71 ++++++++++++++++++++++ > 2 files changed, 71 insertions(+), 27 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iio/pressure/bmp085.txt > create mode 100644 Documentation/devicetree/bindings/iio/pressure/bmp085.yaml > > diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.txt b/Documentation/devicetree/bindings/iio/pressure/bmp085.txt > deleted file mode 100644 > index 61c72e63c584..000000000000 > --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.txt > +++ /dev/null > @@ -1,27 +0,0 @@ > -BMP085/BMP18x/BMP28x digital pressure sensors > - > -Required properties: > -- compatible: must be one of: > - "bosch,bmp085" > - "bosch,bmp180" > - "bosch,bmp280" > - "bosch,bme280" > - > -Optional properties: > -- interrupts: interrupt mapping for IRQ > -- reset-gpios: a GPIO line handling reset of the sensor: as the line is > - active low, it should be marked GPIO_ACTIVE_LOW (see gpio/gpio.txt) > -- vddd-supply: digital voltage regulator (see regulator/regulator.txt) > -- vdda-supply: analog voltage regulator (see regulator/regulator.txt) > - > -Example: > - > -pressure@77 { > - compatible = "bosch,bmp085"; > - reg = <0x77>; > - interrupt-parent = <&gpio0>; > - interrupts = <25 IRQ_TYPE_EDGE_RISING>; > - reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; > - vddd-supply = <&foo>; > - vdda-supply = <&bar>; > -}; > diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml > new file mode 100644 > index 000000000000..884f889c1ca5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml > @@ -0,0 +1,71 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/pressure/bmp085.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: BMP085/BMP180/BMP280/BME280 pressure iio sensors > + > +maintainers: > + - Andreas Klinger > + > +description: | > + Pressure, temperature and humidity iio sensors with i2c and spi interfaces > + > + Specifications about the sensor can be found at: > + https://www.bosch-sensortec.com/bst/products/all_products/bmp180 > + https://www.bosch-sensortec.com/bst/products/all_products/bmp280 > + https://www.bosch-sensortec.com/bst/products/all_products/bme280 > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - bosch,bmp085 > + - bosch,bmp180 > + - bosch,bmp280 > + - bosch,bme280 This too can be just: compatible: enum: - bosch,bmp085 - bosch,bmp180 - bosch,bmp280 - bosch,bme280 > + vddd-supply: > + description: > + digital voltage regulator (see regulator/regulator.txt) > + maxItems: 1 > + > + vdda-supply: > + description: > + analog voltage regulator (see regulator/regulator.txt) > + maxItems: 1 > + > + reset-gpios: > + description: > + A GPIO line handling reset of the sensor. As the line is active low, > + it should be marked GPIO_ACTIVE_LOW (see gpio/gpio.txt) > + maxItems: 1 > + > + interrupts: > + description: > + interrupt mapping for IRQ (BMP085 only) Needs a 'maxItems: 1' > + > +required: > + - compatible > + - vddd-supply > + - vdda-supply > + > +examples: > + - | > + #include > + #include > + i2c0 { > + #address-cells = <1>; > + #size-cells = <0>; > + pressure@77 { > + compatible = "bosch,bmp085"; > + reg = <0x77>; > + interrupt-parent = <&gpio0>; > + interrupts = <25 IRQ_TYPE_EDGE_RISING>; > + reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; > + vddd-supply = <&foo>; > + vdda-supply = <&bar>; > + }; > + }; > -- > 2.11.0