From patchwork Thu May 2 16:14:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Michaelis X-Patchwork-Id: 10927297 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 EF9D41395 for ; Thu, 2 May 2019 16:14:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E167F2022B for ; Thu, 2 May 2019 16:14:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5BC4205E9; Thu, 2 May 2019 16:14:45 +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,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 8275F2022B for ; Thu, 2 May 2019 16:14:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbfEBQOo (ORCPT ); Thu, 2 May 2019 12:14:44 -0400 Received: from da1vs03.rockwellcollins.com ([205.175.227.47]:44885 "EHLO da1vs03.rockwellcollins.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbfEBQOo (ORCPT ); Thu, 2 May 2019 12:14:44 -0400 Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs03.rockwellcollins.com with ESMTP; 02 May 2019 11:14:43 -0500 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id D0EE220080; Thu, 2 May 2019 11:14:42 -0500 (CDT) From: Adam Michaelis To: linux-iio@vger.kernel.org Cc: lars@metafoo.de, michael.hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, charles-antoine.couret@essensium.com, devicetree@vger.kernel.org, brandon.maier@rockwellcollins.com, clayton.shotwell@rockwellcollins.com, Adam Michaelis Subject: [PATCH v2 2/6] dt-bindings: iio: ad7949: Add adi,reference-select Date: Thu, 2 May 2019 11:14:28 -0500 Message-Id: <1556813672-49861-2-git-send-email-adam.michaelis@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1556813672-49861-1-git-send-email-adam.michaelis@rockwellcollins.com> References: <1556813672-49861-1-git-send-email-adam.michaelis@rockwellcollins.com> 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 Adding optional parameter to AD7949 to specify the source for the reference voltage signal. Default value is maintaned with option '6' to match previous version of driver. Signed-off-by: Adam Michaelis --- V2: Add some defines to reduce use of magic numbers. --- .../devicetree/bindings/iio/adc/ad7949.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt index c7f5057356b1..14ee9a2cb2a5 100644 --- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt +++ b/Documentation/devicetree/bindings/iio/adc/ad7949.txt @@ -6,11 +6,29 @@ Required properties: * "adi,ad7682" * "adi,ad7689" - reg: spi chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage -Example: +Optional properties: + - adi,reference-select: Select the reference voltage source to use + when converting the input voltages. Valid values are: + 0: Internal 2.5V reference; temperature sensor enabled + 1: Internal 4.096V reference; temperature sensor enabled + 2: External reference, temperature sensor enabled, no buffer + 3: External reference, temperature sensor enabled, buffer enabled + 6: External reference, temperature sensor disabled, no buffer + 7: External reference, temperature sensor disabled, buffer enabled + - vref-supply: The regulator supply for ADC reference voltage. Required + if external reference selected by 'adi,reference-select'. + +Examples: adc@0 { compatible = "adi,ad7949"; reg = <0>; + adi,reference-select = <2>; vref-supply = <&vdd_supply>; }; + +adc@0 { + compatible = "adi,ad7949"; + reg = <0>; + adi,reference-select = <0>; +};