[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220902120611.000007a0@huawei.com>
Date: Fri, 2 Sep 2022 12:06:11 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
CC: Ciprian Regus <ciprian.regus@...log.com>, <jic23@...nel.org>,
<robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
<linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v2 4/5] drivers: iio: adc: LTC2499 support
On Thu, 1 Sep 2022 16:23:09 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
> On 01/09/2022 15:16, Ciprian Regus wrote:
> > The LTC2499 is a 16-channel (eight differential), 24-bit,
> > ADC with Easy Drive technology and a 2-wire, I2C interface.
> >
> > Implement support for the LTC2499 ADC by extending the LTC2497
> > driver. A new chip_info struct is added to differentiate between
> > chip types and resolutions when reading data from the device.
> >
> > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
>
> Missing blank line. Use standard Git tools for handling your patches or
> be sure you produce the same result when using some custom process.
My understanding is Datasheet is a standard tag as part of the main tag block.
There should not be a blank line between that and the Sign off.
+CC Andy who can probably point to a reference for that...
>
> > Signed-off-by: Ciprian Regus <ciprian.regus@...log.com>
>
> (...)
>
> > +};
> > +
> > static const struct i2c_device_id ltc2497_id[] = {
> > - { "ltc2497", 0 },
> > + { "ltc2497", (kernel_ulong_t)<c2497_info[TYPE_LTC2497] },
> > + { "ltc2499", (kernel_ulong_t)<c2497_info[TYPE_LTC2497] },
>
> So they are the same, aren't they?
>
> > { }
> > };
> > MODULE_DEVICE_TABLE(i2c, ltc2497_id);
> >
> > static const struct of_device_id ltc2497_of_match[] = {
> > - { .compatible = "lltc,ltc2497", },
> > + { .compatible = "lltc,ltc2497", .data = <c2497_info[TYPE_LTC2497] },
> > + { .compatible = "lltc,ltc2499", .data = <c2497_info[TYPE_LTC2499] },
>
> I think this should be split into two patches for easier review - one
> working on driver data for existing variant and second for adding new
> variant 2499.
>
> > {},
> > };
> > MODULE_DEVICE_TABLE(of, ltc2497_of_match);
> > diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h
> > index d0b42dd6b8ad..95f6a5f4d4a6 100644
> > --- a/drivers/iio/adc/ltc2497.h
> > +++ b/drivers/iio/adc/ltc2497.h
> > @@ -4,9 +4,20 @@
> > #define LTC2497_CONFIG_DEFAULT LTC2497_ENABLE
> > #define LTC2497_CONVERSION_TIME_MS 150ULL
> >
> > +enum ltc2497_chip_type {
> > + TYPE_LTC2496,
>
> Why having here 2496 and not using it?
>
> > + TYPE_LTC2497,
> > + TYPE_LTC2499,
> > +};
> > +
> Krzysztof
Powered by blists - more mailing lists