Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Kunyang Fan <Kunyang_Fan@aaeon.com.tw>
Subject: Re: [PATCH] iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs
Date: Mon, 4 Oct 2021 20:25:29 +0100	[thread overview]
Message-ID: <20211004202529.36b2e1dd@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfduySLoeLUS0QsjVhqm7bfh9pbwreMmBYkTva7EH6jPg@mail.gmail.com>

On Sun, 3 Oct 2021 19:28:06 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sun, Oct 3, 2021 at 7:20 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Unfortuanately a non standards compliant ACPI ID is known to be  
> 
> Unfortunately

One day I'll actually remember to spell check my patch descriptions.
Sorry!

> 
> > in the wild on some AAEON boards.
> >
> > Partly revert the removal of these IDs so that ADC081C will again
> > work + add a comment to that affect for future reference.  
> 
> affect?! Okay, you are native speaker.

Doesn't make me competent at writing my native language :)

> 
> ...
> 
> > +#include <linux/acpi.h>  
> 
> > +       if (ACPI_COMPANION(&client->dev)) {
> > +               const struct acpi_device_id *ad_id;
> > +
> > +               ad_id = acpi_match_device(client->dev.driver->acpi_match_table,
> > +                                         &client->dev);
> > +               if (!ad_id)
> > +                       return -ENODEV;
> > +               model = &adcxx1c_models[ad_id->driver_data];
> > +       } else {
> > +               model = &adcxx1c_models[id->driver_data];
> > +       }  
> 
> Can we please use device_get_match_data() instead (with corresponding
> property.h inclusion instead of acpi.h)?
> This may require adding driver_data to OF IDs.
> 

Sure. I was going for minimal change + most revert like, but fair enough
we'll clean that up whilst here.

Jonathan



  reply	other threads:[~2021-10-04 19:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 16:24 [PATCH] iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs Jonathan Cameron
2021-10-03 16:28 ` Andy Shevchenko
2021-10-04 19:25   ` Jonathan Cameron [this message]
2021-11-30  4:22   ` Kunyang Fan(范坤揚)
2021-11-30  9:44     ` Andy Shevchenko
2021-11-30 10:10       ` Jonathan Cameron
2021-11-30 10:16         ` Kunyang Fan(范坤揚)

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=20211004202529.36b2e1dd@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Kunyang_Fan@aaeon.com.tw \
    --cc=andy.shevchenko@gmail.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
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