Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp502701yba; Mon, 1 Apr 2019 10:35:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqziwVf5plTEavQ/ez+suYL+N05NhaQN8Dwm7Gji2B4DjylCkq5kEmSKkYTFJwylK4CHBWkI X-Received: by 2002:a65:64c9:: with SMTP id t9mr58740825pgv.221.1554140119390; Mon, 01 Apr 2019 10:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554140119; cv=none; d=google.com; s=arc-20160816; b=bJ/gpo6zYgx0AGvy3vsNOc1g2M5A+pn98xLaa8C4441wdyoh5VRzdqlNpS9UWS6HhJ tbLsMTJqU5cuteq1APW4CaahVZp3T+pDqYAydN4RS+MMvWS/MVL4eH2HVGSrHt1O138c xJsgSeEY67dURABm8Sxqxui8r+HI2IrrIF42Z6qtt4k46VEbluaAeh5IbP3ji51WsAzi Sd3f4/AZhKpCsGTuczPBj7+enzA5JP2I0KAGq2GSh/xueNWva6vsA992mIdnMr93OZpi 6DBr9Jx0wiFqIfuD7aamjDfia/9YHeNMwP5+GT6Ojgo9kZkw0FHkpPkBUf/5HvF53XQa eRZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=X25bhvECVoTnQCjxwzPzZ/ZjqsL5JO2VJhsdO2Vw6eM=; b=EroWYfJqEOdQKkq75GJxDK+AtKagJiHHuB91GDJzCMLk226zFjqcUKZvxXbhuVFdtb UdkxjLmimOB7E4qB/WwjVnd5oYWerHXSf2QXtAITkehnzZAY5KodMXYGk18FLwIjC7Bk Ulo37aacqDva2YVbGF6oKSEZcC9uC4ccqCAuE784/0jSspw4JPHZO57J2mtHHxes4vpb tdXkgv14UkPEDXJmimFEwA59mJeU+5NtkQyWnrNt2WU/oLPosy1hkykbDy/JGKlruUMG L6CLSV/NGVA0J35mPuepfkAnjVQ6ArrLZxNMCyrSIwM9Bl2dMbe32dgiq0MfejTFfZ0m I01Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si8957448pgs.438.2019.04.01.10.35.03; Mon, 01 Apr 2019 10:35:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387784AbfDARe0 (ORCPT + 99 others); Mon, 1 Apr 2019 13:34:26 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:58647 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387752AbfDAReV (ORCPT ); Mon, 1 Apr 2019 13:34:21 -0400 Received: from localhost ([88.128.82.80]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MKuGD-1hW70Y3ITN-00LIAd; Mon, 01 Apr 2019 19:33:55 +0200 Date: Mon, 1 Apr 2019 19:33:54 +0200 From: Andreas Klinger To: jic23@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] avia-hx711.yaml: transform DT binding to YAML Message-ID: <20190401173353.g4k5vb6flsfgtaaj@arbad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X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/ZXWQw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org replace avia-hx711.txt by avia-hx711.yaml as yaml devicetree documentation for avia hx711 iio adc sensor Signed-off-by: Andreas Klinger --- .../devicetree/bindings/iio/adc/avia-hx711.txt | 24 -------- .../devicetree/bindings/iio/adc/avia-hx711.yaml | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt deleted file mode 100644 index 7222328a3d0d..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt +++ /dev/null @@ -1,24 +0,0 @@ -* AVIA HX711 ADC chip for weight cells - Bit-banging driver - -Required properties: - - compatible: Should be "avia,hx711" - - sck-gpios: Definition of the GPIO for the clock - - dout-gpios: Definition of the GPIO for data-out - See Documentation/devicetree/bindings/gpio/gpio.txt - - avdd-supply: Definition of the regulator used as analog supply - -Optional properties: - - clock-frequency: Frequency of PD_SCK in Hz - Minimum value allowed is 10 kHz because of maximum - high time of 50 microseconds. - -Example: -weight { - compatible = "avia,hx711"; - sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; - dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; - avdd-suppy = <&avdd>; - clock-frequency = <100000>; -}; - diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml b/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml new file mode 100644 index 000000000000..8a4100ceeaf2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/iio/adc/avia-hx711.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: AVIA HX711 ADC chip for weight cells + +maintainers: + - Andreas Klinger + +description: | + Bit-banging driver using two GPIOs: + - sck-gpio gives a clock to the sensor with 24 cycles for data retrieval + and up to 3 cycles for selection of the input channel and gain for the + next measurement + - dout-gpio is the sensor data the sensor responds to the clock + + Specifications about the driver can be found at: + http://www.aviaic.com/ENProducts.aspx + +properties: + compatible: + enum: + - avia,hx711 + + sck-gpios: + description: + Definition of the GPIO for the clock (output). In the datasheet it is + named PD_SCK + maxItems: 1 + + dout-gpios: + description: + Definition of the GPIO for the data-out sent by the sensor in + response to the clock (input). + See Documentation/devicetree/bindings/gpio/gpio.txt for information + on how to specify a consumer gpio. + maxItems: 1 + + avdd-supply: + description: + Definition of the regulator used as analog supply + maxItems: 1 + + clock-frequency: + minimum: 20000 + maximum: 2500000 + default: 400000 + +required: + - compatible + - sck-gpios + - dout-gpios + - avdd-supply + +examples: + - | + #include + weight { + compatible = "avia,hx711"; + sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + avdd-suppy = <&avdd>; + clock-frequency = <100000>; + }; -- 2.11.0