From: Jonathan Cameron <jic23@kernel.org>
To: Darius Berghe <darius.berghe@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/3] iio:adc:ltc2471: add match table for existing devices
Date: Sat, 20 Jun 2020 16:20:31 +0100 [thread overview]
Message-ID: <20200620162031.5e9330d8@archlinux> (raw)
In-Reply-To: <20200617133523.58158-1-darius.berghe@analog.com>
On Wed, 17 Jun 2020 16:35:21 +0300
Darius Berghe <darius.berghe@analog.com> wrote:
> OF style match table is the proper way of matching device tree nodes
> with drivers and such table was missing, this commit adds it.
>
> Signed-off-by: Darius Berghe <darius.berghe@analog.com>
Hi Darius
A few minor things inline.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ltc2471.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/iio/adc/ltc2471.c b/drivers/iio/adc/ltc2471.c
> index 55fab612843a..0e5cdb43a943 100644
> --- a/drivers/iio/adc/ltc2471.c
> +++ b/drivers/iio/adc/ltc2471.c
> @@ -143,9 +143,17 @@ static const struct i2c_device_id ltc2471_i2c_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, ltc2471_i2c_id);
>
> +static const struct of_device_id ltc2471_of_match[] = {
Should include mod_device_table.h as we are using of_device_id
which is defined in that header.
> + { .compatible = "adi,ltc2471" },
> + { .compatible = "adi,ltc2473" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, ltc2471_of_match);
> +
> static struct i2c_driver ltc2471_i2c_driver = {
> .driver = {
> .name = "ltc2471",
> + .of_match_table = of_match_ptr(ltc2471_of_match)
Drop the of_match_ptr protection. That prevents the use of
this binding with ACPI (via the magic of PRP0001 which allows
you to use DT bindings in an ACPI DSDT).
We are slowly working our way through all the drivers removing the
use of this macro (and converting to generic binding handling
where relevant). It'll take a while yet though before there
are no instances of this to copy!
> },
> .probe = ltc2471_i2c_probe,
> .id_table = ltc2471_i2c_id,
prev parent reply other threads:[~2020-06-20 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 13:35 [PATCH v1 1/3] iio:adc:ltc2471: add match table for existing devices Darius Berghe
2020-06-17 13:35 ` [PATCH v1 2/3] iio:adc:ltc2471: add ltc2461/ltc2463 compatible strings Darius Berghe
2020-06-17 13:35 ` [PATCH v1 3/3] iio:adc:ltc2471: add dt binding yaml Darius Berghe
2020-06-20 15:31 ` Jonathan Cameron
2020-06-22 8:05 ` Berghe, Darius
2020-06-27 14:46 ` Jonathan Cameron
2020-06-20 15:20 ` Jonathan Cameron [this message]
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=20200620162031.5e9330d8@archlinux \
--to=jic23@kernel.org \
--cc=darius.berghe@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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).