Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Alexandru Ardelean <alexandru.Ardelean@analog.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	"Signed-off-by: Dan O'Donovan" <dan@emutex.com>
Subject: Re: [PATCH 15/23] iio:adc:ti-adc081c: Drop of_match_ptr and change to mod_devicetable.h
Date: Sat, 4 Jul 2020 16:45:05 +0100
Message-ID: <20200704164505.32b92957@archlinux> (raw)
In-Reply-To: <CAHp75VfMdv-VzHcbS75psjdWGOnR8bkO3vmE5Z82vAMiGZJYtQ@mail.gmail.com>

On Tue, 30 Jun 2020 10:12:51 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sun, Jun 28, 2020 at 3:39 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Whilst this driver already supports explicit ACPI bindings we
> > might as well also allow for PRP0001 based binding.
> >
> > I'm also keen to remove of_match_ptr from IIO drivers to avoid
> > this (now) anti-pattern getting coppied into new drivers.
> >  
> 
> Code LGTM, but see below.
> 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > ---
> >  drivers/iio/adc/ti-adc081c.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c
> > index 82e524b3db88..e00350e6503f 100644
> > --- a/drivers/iio/adc/ti-adc081c.c
> > +++ b/drivers/iio/adc/ti-adc081c.c
> > @@ -18,7 +18,7 @@
> >  #include <linux/err.h>
> >  #include <linux/i2c.h>
> >  #include <linux/module.h>
> > -#include <linux/of.h>
> > +#include <linux/mod_devicetable.h>
> >  #include <linux/acpi.h>
> >
> >  #include <linux/iio/iio.h>
> > @@ -230,7 +230,6 @@ static const struct i2c_device_id adc081c_id[] = {
> >  };
> >  MODULE_DEVICE_TABLE(i2c, adc081c_id);
> >
> > -#ifdef CONFIG_OF
> >  static const struct of_device_id adc081c_of_match[] = {
> >         { .compatible = "ti,adc081c" },
> >         { .compatible = "ti,adc101c" },
> > @@ -238,7 +237,6 @@ static const struct of_device_id adc081c_of_match[] = {
> >         { }
> >  };
> >  MODULE_DEVICE_TABLE(of, adc081c_of_match);
> > -#endif
> >
> >  #ifdef CONFIG_ACPI
> >  static const struct acpi_device_id adc081c_acpi_match[] = {  
> 
> These IDs seem to me artificial (and non-official). Perhaps in a
> separate patch remove them?
> Or do we have confirmation (in writing) from TI that these are okay?
+CC Dan O'Donovan,

It seems highly unlikely these are 'official'.

Dan.  You added them, can you give us some background (admittedly
4 years ago so you may not recall!)

Unfortunately I was rather less aware of ACPI than I have become in
the meantime, so let these in without questioning them.

If we have these out there in in the wild, we can still add a note
to make it clear that people should avoid using them in future,
or copying the approach in other drivers.

Jonathan

> 
> > @@ -253,7 +251,7 @@ MODULE_DEVICE_TABLE(acpi, adc081c_acpi_match);
> >  static struct i2c_driver adc081c_driver = {
> >         .driver = {
> >                 .name = "adc081c",
> > -               .of_match_table = of_match_ptr(adc081c_of_match),
> > +               .of_match_table = adc081c_of_match,
> >                 .acpi_match_table = ACPI_PTR(adc081c_acpi_match),
> >         },
> >         .probe = adc081c_probe,
> > --
> > 2.27.0
> >  
> 
> 


  reply index

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 12:36 [PATCH 00/23] iio:adc more of_match_ptr and similar removal Jonathan Cameron
2020-06-28 12:36 ` [PATCH 01/23] iio:adc:lpc32xx: Drop of_match_ptr protection Jonathan Cameron
2020-06-30  7:01   ` Andy Shevchenko
2020-07-04 16:49     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 02/23] iio:adc:axp20x: Convert from OF to generic fw / device properties Jonathan Cameron
2020-06-28 17:43   ` Andy Shevchenko
2020-06-28 19:16     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 03/23] iio:adc:hi8435: Drop unused of_gpio.h header Jonathan Cameron
2020-07-04 16:52   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 04/23] iio:adc:hi8435: Drop of_match_ptr protection Jonathan Cameron
2020-07-04 16:53   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 05/23] iio:adc:max1363: Drop of_match_ptr and use generic device_get_match_data Jonathan Cameron
2020-07-04 16:54   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 06/23] iio:adc:max1027: drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-07-04 16:56   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 07/23] iio:adc:ltc2496: Drop of_match_ptr and use mod_devicetable.h Jonathan Cameron
2020-06-28 15:52   ` Uwe Kleine-König
2020-07-04 16:58     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 08/23] iio:adc:cpcap-adc: Drop of_match_ptr protection and use device_get_match_data Jonathan Cameron
2020-06-29 15:21   ` Tony Lindgren
2020-07-04 17:00     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 09/23] iio:adc:ltc2497 drop of_match_ptr protection Jonathan Cameron
2020-06-28 15:53   ` Uwe Kleine-König
2020-07-04 17:04     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 10/23] iio:adc:max11100: Drop of_match_ptr protection / add mod_devicetable.h include Jonathan Cameron
2020-06-29  7:28   ` Jacopo Mondi
2020-07-04 17:19     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 11/23] iio:adc:max1118: Drop CONFIG_OF / of_match_ptr protections Jonathan Cameron
2020-07-04 17:20   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 12/23] iio:adc:mcp320x: Drop CONFIG_OF and " Jonathan Cameron
2020-07-04 17:21   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 13/23] iio:adc:mcp3422: remove " Jonathan Cameron
2020-07-04 17:22   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 14/23] iio:adc:sd_adc_modulator: Drop of_match_ptr and tweak includes Jonathan Cameron
2020-07-04 17:24   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 15/23] iio:adc:ti-adc081c: Drop of_match_ptr and change to mod_devicetable.h Jonathan Cameron
2020-06-30  7:12   ` Andy Shevchenko
2020-07-04 15:45     ` Jonathan Cameron [this message]
2020-07-04 17:26       ` Jonathan Cameron
2020-07-04 18:31         ` Andy Shevchenko
2020-06-28 12:36 ` [PATCH 16/23] iio:adc:ti-adc0832: drop CONFIG_OF and of_match_ptr protections Jonathan Cameron
2020-07-04 17:29   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 17/23] iio:adc:ti-adc084s021: drop of_match_ptr protection Jonathan Cameron
2020-07-04 17:30   ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 18/23] iio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections Jonathan Cameron
2020-06-30  7:20   ` Andy Shevchenko
2020-07-04 15:54     ` Jonathan Cameron
2020-07-04 18:16       ` Andy Shevchenko
2020-06-28 12:36 ` [PATCH 19/23] iio:adc:ti-adc128s052: drop of_match_ptr protection Jonathan Cameron
2020-06-30  7:22   ` Andy Shevchenko
2020-07-04 15:58     ` Jonathan Cameron
2020-07-04 18:20       ` Andy Shevchenko
2020-06-28 12:36 ` [PATCH 20/23] iio:adc:ti-adc161s626: Drop " Jonathan Cameron
2020-06-28 19:51   ` Matt Ranostay
2020-07-04 17:31     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 21/23] iio:adc:ti-tlc4541: Drop CONFIG_OF and of_match_ptr protections Jonathan Cameron
2020-06-28 23:43   ` Phil Reid
2020-07-04 17:32     ` Jonathan Cameron
2020-06-28 12:36 ` [PATCH 22/23] iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h Jonathan Cameron
2020-06-30  7:25   ` Andy Shevchenko
2020-07-04 15:59     ` Jonathan Cameron
2020-07-04 18:22       ` Andy Shevchenko
2020-06-28 12:36 ` [PATCH 23/23] iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h Jonathan Cameron
2020-07-04 17:33   ` Jonathan Cameron
2020-06-28 17:53 ` [PATCH 00/23] iio:adc more of_match_ptr and similar removal Andy Shevchenko
2020-06-28 19:32   ` Jonathan Cameron
2020-06-30  7:27 ` Andy Shevchenko
2020-07-04 17:35   ` 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=20200704164505.32b92957@archlinux \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alexandru.Ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dan@emutex.com \
    --cc=linux-iio@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

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git