[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeP_ZLYSty2x_m27M_1HzsXx_DX=UsZopPEonAfr7_RyA@mail.gmail.com>
Date: Thu, 25 Aug 2022 23:11:55 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Ramona Bolboaca <ramona.bolboaca@...log.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-iio <linux-iio@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: add max11205 adc driver
On Wed, Aug 24, 2022 at 3:56 PM Ramona Bolboaca
<ramona.bolboaca@...log.com> wrote:
>
> Adding support for max11205 16-bit single-channel ultra-low power
> delta-sigma adc.
> The MAX11205 is compatible with the 2-wire interface and uses
> SCLK and RDY/DOUT for serial communica- tions. In this mode, all
> controls are implemented by tim- ing the high or low phase of the SCLK.
> The 2-wire serial interface only allows for data to be read out through the
> RDY/DOUT output.
Is there any existing driver that can be extended to support this chip?
...
> + st->chip_info = device_get_match_data(&spi->dev);
And if chip_info is NULL?
...
> +static void max11205_remove(struct spi_device *spi)
> +{
> + struct iio_dev *indio_dev = spi_get_drvdata(spi);
> + struct max11205_state *st = iio_priv(indio_dev);
> + iio_device_unregister(indio_dev);
> + regulator_disable(st->vref);
> +}
Have you tested module removal?
> +
...
> +static const struct chip_info max11205_chip_info[] = {
> + [TYPE_MAX11205A] = {
> + .out_data_rate = MAX11205A_OUT_DATA_RATE,
> + .name = "max11205a"
+ Comma
> + },
> + [TYPE_MAX11205B] = {
> + .out_data_rate = MAX11205B_OUT_DATA_RATE,
> + .name = "max11205b"
Ditto.
> + }
Ditto.
> +};
...
> +
Redundant blank line.
> +module_spi_driver(max11205_spi_driver);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists