From patchwork Fri Mar 15 09:52:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10854411 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 4EDBB1575 for ; Fri, 15 Mar 2019 10:02:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 332932A912 for ; Fri, 15 Mar 2019 10:02:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27A912A928; Fri, 15 Mar 2019 10:02:35 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8242E2A912 for ; Fri, 15 Mar 2019 10:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2JQ1bB3Pe/8Lmw8KzhVtIFsCEe1/8ZmW4bdGa15Nl3U=; b=tHkRbCWooCTMxn dfFypwB2wO1ULoDgufGK8Nx0vLjHsFxKpy6cjY0SvOYlLjWcIkG04SXx31RgFVGtZIfR5ouKcDRga m3x2XxMS0RLGtpc8XFcwQz5RQNfUoUegNob8sKhqoUa9iEnJYDmMYDyLTszHKF29K7/3Ap1ud26AB dfSe2kpD436UKwMclKLVtUiagd+1Utk/YL5EFZ60FB4zqTXER6Cjn9mYLxmmdaU+0GLyMRhKcr8uE oI2Uv25f9aXFrV+bXpjA4/6N8wVeWL03PTfUHybgB9iXFkvJ1KEbhkwBl0WlOO5JOuzSkOoVkoFXH F4ESrX3LD6UKSzAAodnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfd-0001E1-19; Fri, 15 Mar 2019 10:02:33 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfM-0000c8-Dj for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2019 10:02:18 +0000 X-Originating-IP: 109.213.80.250 Received: from localhost (alyon-652-1-57-250.w109-213.abo.wanadoo.fr [109.213.80.250]) (Authenticated sender: gregory.clement@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B3989E0029; Fri, 15 Mar 2019 10:01:44 +0000 (UTC) From: Gregory CLEMENT To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: [PATCH v2 1/4] iio: adc: lpc32xx: Sort headers Date: Fri, 15 Mar 2019 10:52:28 +0100 Message-Id: <20190315095231.17001-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315095231.17001-1-gregory.clement@bootlin.com> References: <20190315095231.17001-1-gregory.clement@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_030216_607289_E3E4C5BA X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Gregory CLEMENT , Vladimir Zapolskiy , Rob Herring , Thomas Petazzoni , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Gregory CLEMENT --- drivers/iio/adc/lpc32xx_adc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c index e361c1532a75..7084f804504e 100644 --- a/drivers/iio/adc/lpc32xx_adc.c +++ b/drivers/iio/adc/lpc32xx_adc.c @@ -7,20 +7,19 @@ * Copyright (C) 2011, 2012 Roland Stigge */ -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#include - +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include /* * LPC32XX registers definitions From patchwork Fri Mar 15 09:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10854409 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 1DF431515 for ; Fri, 15 Mar 2019 10:02:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 023852A927 for ; Fri, 15 Mar 2019 10:02:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6E172A91B; Fri, 15 Mar 2019 10:02:24 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F4AE2A92C for ; Fri, 15 Mar 2019 10:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CNEp5xvmf4AThvHKum1MEL+ZPsp29IZVqQi+4xalD7s=; b=CSQAZHrBHy6qE2 bCgm8yrgv702dLWKjG2GSX73toUTxHB2IFkeERa8RA4FMat+7e4c5+6hc2t/PMTLDWgYelW2mMzEP P6weLvif2O7StuFKi0TmYTLcSsn359mJb9l/PWJv0clbMamatltTtuWYcrhS3qDVp3Pe5Qjuwo6Zw MnRGbYv47Y/dVJ2nJVNXDW1GnZOiM/Im25Dkr8C7TNLcqyMV/BT9noE8vIIZQDSRX6NIpdy7WDIzN 04ryp/L37X2Xn3TrSQEB+yr52SrtlF7647/I+9wZRhh+gzu1IPdaPVZ3CFVYlhi9own3PIhCasfwm rwZ9JQ5bA7R/2an2sG/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfP-0000sP-0M; Fri, 15 Mar 2019 10:02:19 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfL-0000c9-LS for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2019 10:02:16 +0000 X-Originating-IP: 109.213.80.250 Received: from localhost (alyon-652-1-57-250.w109-213.abo.wanadoo.fr [109.213.80.250]) (Authenticated sender: gregory.clement@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 39109E0005; Fri, 15 Mar 2019 10:01:48 +0000 (UTC) From: Gregory CLEMENT To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: [PATCH v2 2/4] iio: adc: lpc32xx: Cleanup headers Date: Fri, 15 Mar 2019 10:52:29 +0100 Message-Id: <20190315095231.17001-3-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315095231.17001-1-gregory.clement@bootlin.com> References: <20190315095231.17001-1-gregory.clement@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_030215_874309_A581081B X-CRM114-Status: UNSURE ( 7.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Gregory CLEMENT , Vladimir Zapolskiy , Rob Herring , Thomas Petazzoni , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP A few headers is useless: remove them. Signed-off-by: Gregory CLEMENT --- drivers/iio/adc/lpc32xx_adc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c index 7084f804504e..f391c1e10136 100644 --- a/drivers/iio/adc/lpc32xx_adc.c +++ b/drivers/iio/adc/lpc32xx_adc.c @@ -9,17 +9,11 @@ #include #include -#include -#include #include -#include #include #include -#include #include -#include #include -#include /* * LPC32XX registers definitions From patchwork Fri Mar 15 09:52:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10854413 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 08C3E1575 for ; Fri, 15 Mar 2019 10:02:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9DB52A91A for ; Fri, 15 Mar 2019 10:02:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D76C62A920; Fri, 15 Mar 2019 10:02:48 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A3C82A929 for ; Fri, 15 Mar 2019 10:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XL5zAilnnueyhqkQQurD81yIWfzjXkFmVCRCHeQMF7g=; b=iEvWue2lOTyFTV tmsi4wrbmRv9ViirbdZe9J3fzKYsRnWnkHmV/98E8CoPMMJ/Tl1PTs4pLSiP+uuV3NkKQiVoyqMUw mClYxDV6PPnghtej80kECJ2XM7E7g7OguJAs4hTnAqpiBAmAVhv8441tKWDdts/O/09cY4GZ274at uHrlTtLNvWusi6eZF1B0YvegiX1JEpyDQ4mmtHlgrz4gPzroRSDjhIu8l1gwQ5Zh+RwfDycAzdble 3jbgrJ0trKEftYplUE/Z4BXHAzZAX2nd5XbJQBuBUhLI2y54t+1Od0CtnaLgwa5EeAa9b0kApST+7 GIPjbI+uwUvkpjXdLXGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfq-0001Pz-Jq; Fri, 15 Mar 2019 10:02:46 +0000 Received: from relay12.mail.gandi.net ([217.70.178.232]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfN-0000cw-0E for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2019 10:02:19 +0000 Received: from localhost (alyon-652-1-57-250.w109-213.abo.wanadoo.fr [109.213.80.250]) (Authenticated sender: gregory.clement@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 356CD20000D; Fri, 15 Mar 2019 10:01:51 +0000 (UTC) From: Gregory CLEMENT To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: [PATCH v2 3/4] iio: adc: lpc32xx: Add scale feature Date: Fri, 15 Mar 2019 10:52:30 +0100 Message-Id: <20190315095231.17001-4-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315095231.17001-1-gregory.clement@bootlin.com> References: <20190315095231.17001-1-gregory.clement@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_030217_379857_A2A19766 X-CRM114-Status: GOOD ( 15.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Gregory CLEMENT , Vladimir Zapolskiy , Rob Herring , Thomas Petazzoni , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Until now this driver only exposed the raw value of the channels. With this patch, the scale value is also exposed. It depends of a regulator supply, and unlike most of the other driver, do not having this regulator won't prevent to use the driver. The reason for it is to allow to continue to use this driver with an old device tree. If there is no regulator supply then the scale won't be exposed. Signed-off-by: Gregory CLEMENT --- drivers/iio/adc/lpc32xx_adc.c | 44 ++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c index f391c1e10136..5d1c76e3aad8 100644 --- a/drivers/iio/adc/lpc32xx_adc.c +++ b/drivers/iio/adc/lpc32xx_adc.c @@ -14,6 +14,7 @@ #include #include #include +#include /* * LPC32XX registers definitions @@ -45,6 +46,7 @@ struct lpc32xx_adc_state { void __iomem *adc_base; struct clk *clk; struct completion completion; + struct regulator *vref; u32 value; }; @@ -57,7 +59,9 @@ static int lpc32xx_read_raw(struct iio_dev *indio_dev, { struct lpc32xx_adc_state *st = iio_priv(indio_dev); int ret; - if (mask == IIO_CHAN_INFO_RAW) { + + switch (mask) { + case IIO_CHAN_INFO_RAW: mutex_lock(&indio_dev->mlock); ret = clk_prepare_enable(st->clk); if (ret) { @@ -77,22 +81,36 @@ static int lpc32xx_read_raw(struct iio_dev *indio_dev, mutex_unlock(&indio_dev->mlock); return IIO_VAL_INT; - } - return -EINVAL; + case IIO_CHAN_INFO_SCALE: + *val = regulator_get_voltage(st->vref) / 1000; + *val2 = 10; + + return IIO_VAL_FRACTIONAL_LOG2; + default: + return -EINVAL; + } } static const struct iio_info lpc32xx_adc_iio_info = { .read_raw = &lpc32xx_read_raw, }; -#define LPC32XX_ADC_CHANNEL(_index) { \ +#define LPC32XX_ADC_CHANNEL_BASE(_index) \ .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = _index, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ .address = LPC32XXAD_IN * _index, \ - .scan_index = _index, \ + .scan_index = _index, + +#define LPC32XX_ADC_CHANNEL(_index) { \ + LPC32XX_ADC_CHANNEL_BASE(_index) \ +} + +#define LPC32XX_ADC_SCALE_CHANNEL(_index) { \ + LPC32XX_ADC_CHANNEL_BASE(_index) \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) \ } static const struct iio_chan_spec lpc32xx_adc_iio_channels[] = { @@ -101,6 +119,12 @@ static const struct iio_chan_spec lpc32xx_adc_iio_channels[] = { LPC32XX_ADC_CHANNEL(2), }; +static const struct iio_chan_spec lpc32xx_adc_iio_scale_channels[] = { + LPC32XX_ADC_SCALE_CHANNEL(0), + LPC32XX_ADC_SCALE_CHANNEL(1), + LPC32XX_ADC_SCALE_CHANNEL(2), +}; + static irqreturn_t lpc32xx_adc_isr(int irq, void *dev_id) { struct lpc32xx_adc_state *st = dev_id; @@ -159,6 +183,15 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) return retval; } + st->vref = devm_regulator_get(&pdev->dev, "vref"); + if (IS_ERR(st->vref)) { + iodev->channels = lpc32xx_adc_iio_channels; + dev_err(&pdev->dev, + "Missing vref regulator: No scaling available\n"); + } else { + iodev->channels = lpc32xx_adc_iio_scale_channels; + } + platform_set_drvdata(pdev, iodev); init_completion(&st->completion); @@ -167,7 +200,6 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) iodev->dev.parent = &pdev->dev; iodev->info = &lpc32xx_adc_iio_info; iodev->modes = INDIO_DIRECT_MODE; - iodev->channels = lpc32xx_adc_iio_channels; iodev->num_channels = ARRAY_SIZE(lpc32xx_adc_iio_channels); retval = devm_iio_device_register(&pdev->dev, iodev); From patchwork Fri Mar 15 09:52:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10854415 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 A57161515 for ; Fri, 15 Mar 2019 10:03:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 899E42A92C for ; Fri, 15 Mar 2019 10:03:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E3CF2A915; Fri, 15 Mar 2019 10:03:05 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A38B2A920 for ; Fri, 15 Mar 2019 10:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6AyxPrvBdDpIqXxPBlQwlmjMqOuX3iKzSjbwFROswOE=; b=DHa60O395Qu20d kCdGI/tXk5Xluyt4trGrV+/dGKn2qdwuju5Q+JZ5Yf33d4B1/mPbgTTpgZL7kwdOBMdZDKQbl1eQu CIhtwunreaZmsmyrx7BmDCX7b195xPeYI7H9+hkpZrRee85/C1Cfi0R0JesB+6gXuOE73JHLIeJxg MuZk2HoRzNKuVNr1mvk3PN0rzj8iEfOeFoyGVbYg4wiYvfzl0xspI10wqq4oI3JgpuD5YOAs+D1oK nl3ZYwViIZzAM/Y8jUOSeTgejngf+ijNI0pdfqVsp4RLWEfjfag2SEpLu1ZTqlM70ZqrxJZzAJAOh +OR1cOKKwYesMIUpqjEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jg2-0001gR-Pm; Fri, 15 Mar 2019 10:02:58 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4jfX-0000cu-RZ for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2019 10:02:30 +0000 X-Originating-IP: 109.213.80.250 Received: from localhost (alyon-652-1-57-250.w109-213.abo.wanadoo.fr [109.213.80.250]) (Authenticated sender: gregory.clement@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0596340028; Fri, 15 Mar 2019 10:01:53 +0000 (UTC) From: Gregory CLEMENT To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org Subject: [PATCH v2 4/4] dt-bindings: iio: adc: lpc32xx-adc: Document vref-supply Date: Fri, 15 Mar 2019 10:52:31 +0100 Message-Id: <20190315095231.17001-5-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315095231.17001-1-gregory.clement@bootlin.com> References: <20190315095231.17001-1-gregory.clement@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_030228_521737_4510AF24 X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rob Herring , Gregory CLEMENT , Vladimir Zapolskiy , Rob Herring , Thomas Petazzoni , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As most of the other ADC the lpc32xx one use a vref-supply property: document it. Reviewed-by: Rob Herring Signed-off-by: Gregory CLEMENT --- Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt index b3629d3a9adf..3a1bc669bd51 100644 --- a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt @@ -6,6 +6,10 @@ Required properties: region. - interrupts: The ADC interrupt +Optional: + - vref-supply: The regulator supply ADC reference voltage, optional + for legacy reason, but highly encouraging to us in new device tree + Example: adc@40048000 { @@ -13,4 +17,5 @@ Example: reg = <0x40048000 0x1000>; interrupt-parent = <&mic>; interrupts = <39 0>; + vref-supply = <&vcc>; };