[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfONiaWmuadb2ijFcqrdr0QLexmxyd6kHUTxxH-itYtUQ@mail.gmail.com>
Date: Tue, 24 Apr 2018 01:08:31 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Javier Arteaga <javier@...tex.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
"Dan O'Donovan" <dan@...tex.com>, linux-iio@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nicola Lunghi <nicola.lunghi@...tex.com>
Subject: Re: [PATCH v2 2/3] iio: adc128s052: add ACPI _HID AANT1280
On Tue, Apr 24, 2018 at 12:38 AM, Javier Arteaga <javier@...tex.com> wrote:
> From: Nicola Lunghi <nicola.lunghi@...tex.com>
>
> ACPI _HID AANT1280 matches an ADC124S101 present on E3940 SKUs of the UP
> Squared board.
>
> Add it to the driver.
> + if (ACPI_COMPANION(&spi->dev)) {
> + const struct acpi_device_id *ad_id;
> +
> + ad_id = acpi_match_device(spi->dev.driver->acpi_match_table,
> + &spi->dev);
> + if (!ad_id)
> + return -ENODEV;
> +
> + config = ad_id->driver_data;
There is a new API to get it by one call.
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=b283f157611f129f5bbbf7d06f5af860d76797fd
> + } else {
> + config = spi_get_device_id(spi)->driver_data;
> + }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists