Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3368009yba; Sat, 18 May 2019 15:44:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNDpndUQO2sVNfZHZs4l1T+Kn0d91n15oDmJ1XnMGchs/zKaJ2nErgqnfxa/Bw3EERWlrB X-Received: by 2002:a17:902:8a4:: with SMTP id 33mr38684002pll.19.1558219445171; Sat, 18 May 2019 15:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558219445; cv=none; d=google.com; s=arc-20160816; b=AetwFLtH62Rtc1/OpZkZGa29uZyU6EU3DmshjeyHKdjyjZmSvt3yMfu3t8nJM/Yrc6 UVCVv/3lEAhO0rgtGR45+vl02vKbgZpyMHU9HUu2uwdsoHwUxrwt45LWAi6quDHGYWr0 rVXDbzdzaB1n/sTNB46osB3P/DgjhY4kfyZf1CykcpVieSdRSA89pQ1+gg5fJxC1TV8L plQp1biTU8rCEOIEXRb0gsYApFV0sN6tr7i9LefY2yCMTwU8gMdvOBNLm482zqnm81wg 45Copfttc8pvqs7QOZrghQ2eM43xwBPIenZoW3MKKmtvJq44J4jjdNwwUtOFzSyHHQYT OAOQ== 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:dkim-signature; bh=rdPx5/YxFpSy0ERuJlDi1pCpRRi+1n/Zz/+OlelD9So=; b=V8GM769A4yv1tXOKFxT8haLI26iVfMP9FNvMZLUkZOEK+FYnN9mCr7XCsfxcD+oRnl VkjBperNSSOUeGQSBmMG0W3gevoeWKZftcfLyYqWH6jCouLmuXqAosD4GBkxNDkhAF9e /ix4bQZiBIOhzKIG8+06SZCFAwVOuILxZSx9FM3V+UVYH6BtfgSXFW1g7JIhtOtgohaC AHdDxxQTxfoevMiScNxDpptgm7c+Fn5yTNqvHn5IBx0K0hncYW5Y7iyUGlRsvd8zamit TKRB2zd2AeX1wp0KfoH4SV8ITt0GsXZMSmQXyarOpS/liNnsn9vSpgxhZaem1kzxfRhZ FWGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FJCbU/zw"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p66si14398739pfb.34.2019.05.18.15.43.38; Sat, 18 May 2019 15:44:05 -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=@gmail.com header.s=20161025 header.b="FJCbU/zw"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729561AbfERWlT (ORCPT + 99 others); Sat, 18 May 2019 18:41:19 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37748 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728395AbfERWlT (ORCPT ); Sat, 18 May 2019 18:41:19 -0400 Received: by mail-qt1-f193.google.com with SMTP id o7so12198124qtp.4; Sat, 18 May 2019 15:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=rdPx5/YxFpSy0ERuJlDi1pCpRRi+1n/Zz/+OlelD9So=; b=FJCbU/zwkd1ybQFCZz+699GV78RWenKbd4yAsMu89og+U+ud/G0gBA1lLk0jhGKsHd /20pvQNl52SYjWHYXchRUJjluZBM2eBKpfnPvW1OozPtO56p/DzxBQFQUiVXlJU6Tgo5 NiM5cke8s86ykQn1jl2k3Ilrvuh02qxKhkqRp9jdQC0Hrph2C8UzakGGFpmHm/jVsFCe YdJALjVEEwbmU5XL7oJ0Yw2bEk8leZkaPI4sCmG5F3PY7EBLqB9WfpBW2KJBu14Y9dmg TTGGm7pzAPSacONyQ7Iw3eoaotMknPYVxUW4nFb5E5FZUAOAP7+Tlohju3+bAr61PSN1 kzwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=rdPx5/YxFpSy0ERuJlDi1pCpRRi+1n/Zz/+OlelD9So=; b=njOMmd3NmbHQnGCHItughQAyIbNUGNbxhJTmP2GKqVtUH/bWRQOoAW/9F1rbmJqnP4 hsAES1BYqeEESujKbOjKP9WTBylRmgtwkO1YYmw76w4pvq/AFURy8tfKOWIZ01tEAxpY EUKZWCyd6Khd6oX+VA3/OD/rZpNFIwkXtVP4nxJXhR9+HHg7hx5uzBRX05cdWnQyQeRp LzILPFX5EZuOFvrVZ6BuNsn9T11yJd/z4YV9SPlPdh+UmLJY9IyPBuNz+p0oUtIthbHn 7SeW5dzM7JV+lZXmpuH5VBYl7//tin5NwKMJyHekhKg8bARKOxm+KQ+ipIiNaAtEVoPH f6WA== X-Gm-Message-State: APjAAAUywbJfB+jQW0amYSxUP4tlIDHh39SJbj2vnMllpfVLCtcqGfbx qxiN+iNJRZWG8LL/smSvkfQ= X-Received: by 2002:aed:3f9d:: with SMTP id s29mr1168876qth.337.1558219278103; Sat, 18 May 2019 15:41:18 -0700 (PDT) Received: from renatolg ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id y47sm1236580qtb.55.2019.05.18.15.41.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 18 May 2019 15:41:17 -0700 (PDT) Date: Sat, 18 May 2019 19:41:12 -0300 From: Renato Lui Geh To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, stefan.popa@analog.com, alexandru.Ardelean@analog.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, devicetree@vger.kernel.org Subject: [PATCH] dt-bindings: iio: adc: add adi,ad7780.yaml binding Message-ID: <9992a318aec777b9b7788bb40d976aa89e5963fe.1558219042.git.renatogeh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds a YAML binding for the Analog Devices AD7780/1 and AD7170/1 analog-to-digital converters. Signed-off-by: Renato Lui Geh --- .../bindings/iio/adc/adi,ad7780.txt | 48 ----------- .../bindings/iio/adc/adi,ad7780.yaml | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 48 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7780.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7780.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7780.txt deleted file mode 100644 index 440e52555349..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7780.txt +++ /dev/null @@ -1,48 +0,0 @@ -* Analog Devices AD7170/AD7171/AD7780/AD7781 - -Data sheets: - -- AD7170: - * https://www.analog.com/media/en/technical-documentation/data-sheets/AD7170.pdf -- AD7171: - * https://www.analog.com/media/en/technical-documentation/data-sheets/AD7171.pdf -- AD7780: - * https://www.analog.com/media/en/technical-documentation/data-sheets/ad7780.pdf -- AD7781: - * https://www.analog.com/media/en/technical-documentation/data-sheets/AD7781.pdf - -Required properties: - -- compatible: should be one of - * "adi,ad7170" - * "adi,ad7171" - * "adi,ad7780" - * "adi,ad7781" -- reg: spi chip select number for the device -- vref-supply: the regulator supply for the ADC reference voltage - -Optional properties: - -- powerdown-gpios: must be the device tree identifier of the PDRST pin. If - specified, it will be asserted during driver probe. As the - line is active high, it should be marked GPIO_ACTIVE_HIGH. -- adi,gain-gpios: must be the device tree identifier of the GAIN pin. Only for - the ad778x chips. If specified, it will be asserted during - driver probe. As the line is active low, it should be marked - GPIO_ACTIVE_LOW. -- adi,filter-gpios: must be the device tree identifier of the FILTER pin. Only - for the ad778x chips. If specified, it will be asserted - during driver probe. As the line is active low, it should be - marked GPIO_ACTIVE_LOW. - -Example: - -adc@0 { - compatible = "adi,ad7780"; - reg = <0>; - vref-supply = <&vdd_supply> - - powerdown-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; - adi,gain-gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - adi,filter-gpios = <&gpio 15 GPIO_ACTIVE_LOW>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml new file mode 100644 index 000000000000..931bc4f8ec04 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7780.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7170/AD7171/AD7780/AD7781 analog to digital converters + +maintainers: + - Michael Hennerich + +description: | + The ad7780 is a sigma-delta analog to digital converter. This driver provides + reading voltage values and status bits from both the ad778x and ad717x series. + Its interface also allows writing on the FILTER and GAIN GPIO pins on the + ad778x. + + Specifications on the converters can be found at: + AD7170: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7170.pdf + AD7171: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7171.pdf + AD7780: + https://www.analog.com/media/en/technical-documentation/data-sheets/ad7780.pdf + AD7781: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7781.pdf + +properties: + compatible: + enum: + - adi,ad7170 + - adi,ad7171 + - adi,ad7780 + - adi,ad7781 + + reg: + description: + Chip select number for the device + maxItems: 1 + + vref-supply: + description: + The regulator supply for the ADC reference voltage + maxItems: 1 + + powerdown-gpios: + description: + Must be the device tree identifier of the PDRST pin. If + specified, it will be asserted during driver probe. As the + line is active high, it should be marked GPIO_ACTIVE_HIGH. + maxItems: 1 + + adi,gain-gpios: + description: + Must be the device tree identifier of the GAIN pin. Only for + the ad778x chips. If specified, it will be asserted during + driver probe. As the line is active low, it should be marked + GPIO_ACTIVE_LOW. + maxItems: 1 + + adi,filter-gpios: + description: + Must be the device tree identifier of the FILTER pin. Only + for the ad778x chips. If specified, it will be asserted + during driver probe. As the line is active low, it should be + marked GPIO_ACTIVE_LOW. + maxItems: 1 + +required: + - compatible + - reg + - vref-supply + +examples: + - | + #include + adc@0 { + compatible = "adi,ad7780"; + reg = <0>; + vref-supply = <&vdd_supply>; + + powerdown-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + adi,gain-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + adi,filter-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; + }; -- 2.21.0