From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Ciprian Regus <ciprian.regus@analog.com>,
jic23@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] drivers: iio: adc: LTC2499 support
Date: Thu, 1 Sep 2022 16:23:09 +0300 [thread overview]
Message-ID: <4067432b-b5a6-f3eb-a707-5fa298ba846b@linaro.org> (raw)
In-Reply-To: <20220901121700.1325733-4-ciprian.regus@analog.com>
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.
> Signed-off-by: Ciprian Regus <ciprian.regus@analog.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
next prev parent reply other threads:[~2022-09-01 13:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 12:16 [PATCH v2 1/5] dt-bindings: iio: adc: Add docs for LTC2499 Ciprian Regus
2022-09-01 12:16 ` [PATCH v2 2/5] Add the LTC2496 MAINTAINERS entry Ciprian Regus
2022-09-04 14:54 ` Jonathan Cameron
2022-09-01 12:16 ` [PATCH v2 3/5] Remove duplicate matching entry Ciprian Regus
2022-09-01 12:16 ` [PATCH v2 4/5] drivers: iio: adc: LTC2499 support Ciprian Regus
2022-09-01 13:23 ` Krzysztof Kozlowski [this message]
2022-09-02 11:06 ` Jonathan Cameron
2022-09-02 11:37 ` Andy Shevchenko
2022-09-04 14:55 ` Jonathan Cameron
2022-09-05 8:58 ` Krzysztof Kozlowski
2022-09-01 20:00 ` kernel test robot
2022-09-04 15:08 ` Jonathan Cameron
2022-09-01 20:10 ` kernel test robot
2022-09-04 15:06 ` Jonathan Cameron
2022-09-01 12:17 ` [PATCH v2 5/5] drivers: iio: adc: Rename the LTC2499 iio device Ciprian Regus
2022-09-04 15:09 ` Jonathan Cameron
2022-09-01 13:27 ` [PATCH v2 1/5] dt-bindings: iio: adc: Add docs for LTC2499 Krzysztof Kozlowski
2022-09-04 14:53 ` Jonathan Cameron
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=4067432b-b5a6-f3eb-a707-5fa298ba846b@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=ciprian.regus@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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).