From: "Esteban Blanc" <eblanc@baylibre.com>
To: "Nuno Sá" <noname.nuno@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nuno Sa" <nuno.sa@analog.com>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 2/6] iio: adc: ad4030: add driver for ad4030-24
Date: Fri, 13 Sep 2024 12:04:08 +0000 [thread overview]
Message-ID: <D4554LAXBVEX.2Z0H6XMUIPOUB@baylibre.com> (raw)
In-Reply-To: <3c2e0d65225f20c04722f017f7866a47c346782e.camel@gmail.com>
On Fri Sep 13, 2024 at 10:22 AM UTC, Nuno Sá wrote:
> Hi Esteban,
>
> Just one remark...
>
> On Thu, 2024-08-22 at 14:39 -0500, David Lechner wrote:
> > On 8/22/24 7:45 AM, Esteban Blanc wrote:
> > > This adds a new driver for the Analog Devices INC. AD4030-24 ADC.
> > >
> > > The driver implements basic support for the AD4030-24 1 channel
> > > differential ADC with hardware gain and offset control.
> > >
> > > Signed-off-by: Esteban Blanc <eblanc@baylibre.com>
> > > ---
> > > MAINTAINERS | 1 +
> > > drivers/iio/adc/Kconfig | 13 +
> > > drivers/iio/adc/Makefile | 1 +
> > > drivers/iio/adc/ad4030.c | 854 +++++++++++++++++++++++++++++++++++++++++++++++
> > > 4 files changed, 869 insertions(+)
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index f17c42bea19c..6a5a0e7b7a51 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -420,6 +420,7 @@ R: Esteban Blanc <eblanc@baylibre.com>
> > > S: Supported
> > > W: https://ez.analog.com/linux-software-drivers
> > > F: Documentation/devicetree/bindings/iio/adc/adi,ad4030.yaml
> > > +F: drivers/iio/adc/ad4030.c
> > >
> > > AD5110 ANALOG DEVICES DIGITAL POTENTIOMETERS DRIVER
> > > M: Mugilraj Dhavachelvan <dmugil2000@gmail.com>
> > > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> > > index 88e8ce2e78b3..f4bd05780f6f 100644
> > > --- a/drivers/iio/adc/Kconfig
> > > +++ b/drivers/iio/adc/Kconfig
> > > @@ -33,6 +33,19 @@ config AD4000
> > > To compile this driver as a module, choose M here: the module will be
> > > called ad4000.
> > >
> > > +config AD4030
> > > + tristate "Analog Device AD4630 ADC Driver"
> > > + depends on SPI
> > > + depends on GPIOLIB
> > > + select REGMAP_SPI
> >
> > It looks like we are just using REGMAP, not REGMAP_SPI.
> >
> > > + select IIO_BUFFER
> >
> > And also select IIO_TRIGGERED_BUFFER?
> >
> > > + help
> > > + Say yes here to build support for Analog Devices AD4030 and AD4630
> > > high speed
> > > + SPI analog to digital converters (ADC).
> > > +
> > > + To compile this driver as a module, choose M here: the module will be
> > > + called ad4030.
> > > +
> > > config AD4130
> > > tristate "Analog Device AD4130 ADC Driver"
> > > depends on SPI
> > > diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
> > > index 8b80664c6d6b..0e4f833abf0b 100644
> > > --- a/drivers/iio/adc/Makefile
> > > +++ b/drivers/iio/adc/Makefile
> > > @@ -7,6 +7,7 @@
> > > obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o
> > > obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
> > > obj-$(CONFIG_AD4000) += ad4000.o
> > > +obj-$(CONFIG_AD4030) += ad4030.o
> > > obj-$(CONFIG_AD4130) += ad4130.o
> > > obj-$(CONFIG_AD4695) += ad4695.o
> > > obj-$(CONFIG_AD7091R) += ad7091r-base.o
> > > diff --git a/drivers/iio/adc/ad4030.c b/drivers/iio/adc/ad4030.c
> > > new file mode 100644
> > > index 000000000000..a981dce988e5
> > > --- /dev/null
> > > +++ b/drivers/iio/adc/ad4030.c
> > > @@ -0,0 +1,854 @@
> > > +// SPDX-License-Identifier: GPL-2.0-only
> > > +/*
> > > + * Analog Devices AD4030 and AD4630 ADC family driver.
> > > + *
> > > + * Copyright 2024 Analog Devices, Inc.
> > > + * Copyright 2024 BayLibre, SAS
> > > + *
> > > + * based on code from:
> > > + * Analog Devices, Inc.
> > > + * Sergiu Cuciurean <sergiu.cuciurean@analog.com>
> > > + * Nuno Sa <nuno.sa@analog.com>
> > > + * Marcelo Schmitt <marcelo.schmitt@analog.com>
> > > + * Liviu Adace <liviu.adace@analog.com>
> > > + */
> > > + .type = IIO_VOLTAGE, \
> > > + .indexed = 1, \
> > > + .channel = _idx * 2 + 2, \
> > > + .scan_index = _idx * 2 + 1, \
> > > + .extend_name = "Channel" #_idx " common byte part", \
> >
> > Labels are usually one word and reflect the datasheet name.
> >
> > Suggest `"common-mode" #_idx` or `"CM" #_idx` for this one.
> >
>
> Also, .extend_name is not to be used anymore... In the end of the day IIO will create
> label files anyways but from what I remember about this, extend_name is not to be
> directly used this anymore (so other think it's still fine). Instead, use the label
> callback.
Yeah, Jonathan or David mentioned it. I'm using `.read_label` callback
now.
Thanks for your time,
--
Esteban Blanc
BayLibre
next prev parent reply other threads:[~2024-09-13 12:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 12:45 [PATCH 0/6] iio: adc: ad4030: new driver for AD4030 and similar ADCs Esteban Blanc
2024-08-22 12:45 ` [PATCH 1/6] dt-bindings: iio: adc: add ADI ad4030, ad4630 and ad4632 Esteban Blanc
2024-08-22 15:56 ` Conor Dooley
2024-08-26 8:36 ` Krzysztof Kozlowski
2024-08-22 12:45 ` [PATCH 2/6] iio: adc: ad4030: add driver for ad4030-24 Esteban Blanc
2024-08-22 19:39 ` David Lechner
2024-08-24 10:40 ` Jonathan Cameron
2024-09-13 10:22 ` Nuno Sá
2024-09-13 12:04 ` Esteban Blanc [this message]
2024-08-24 11:21 ` Jonathan Cameron
2024-08-27 16:45 ` Esteban Blanc
2024-08-28 13:34 ` Jonathan Cameron
2024-08-22 12:45 ` [PATCH 3/6] iio: adc: ad4030: add averaging support Esteban Blanc
2024-08-22 19:41 ` David Lechner
2024-08-22 12:45 ` [PATCH 4/6] iio: adc: ad4030: add support for ad4630-24 and ad4630-16 Esteban Blanc
2024-08-22 19:43 ` David Lechner
2024-08-26 9:27 ` Jonathan Cameron
2024-09-13 9:55 ` Esteban Blanc
2024-09-13 10:18 ` Nuno Sá
2024-09-13 12:55 ` Esteban Blanc
2024-09-13 13:46 ` Nuno Sá
2024-09-14 11:25 ` Jonathan Cameron
2024-09-16 6:12 ` Nuno Sá
2024-09-17 11:21 ` Jonathan Cameron
2024-09-17 11:19 ` Jonathan Cameron
2024-09-16 9:19 ` Esteban Blanc
2024-09-17 11:21 ` Jonathan Cameron
2024-09-16 13:03 ` Esteban Blanc
2024-08-22 12:45 ` [PATCH 5/6] iio: adc: ad4030: add support for ad4632-16 and ad4632-24 Esteban Blanc
2024-08-26 9:29 ` Jonathan Cameron
2024-08-22 12:45 ` [PATCH 6/6] docs: iio: ad4030: add documentation Esteban Blanc
2024-08-22 19:43 ` David Lechner
2024-08-22 15:54 ` [PATCH 0/6] iio: adc: ad4030: new driver for AD4030 and similar ADCs Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D4554LAXBVEX.2Z0H6XMUIPOUB@baylibre.com \
--to=eblanc@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).