From: Jonathan Cameron <jic23@kernel.org>
To: Wei Yongjun <weiyongjun@huaweicloud.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad9467: Silent no spi_device_id warnings
Date: Mon, 19 Sep 2022 17:00:48 +0100 [thread overview]
Message-ID: <20220919170048.0686b29c@jic23-huawei> (raw)
In-Reply-To: <20220919150003.823364-1-weiyongjun@huaweicloud.com>
On Mon, 19 Sep 2022 15:00:03 +0000
Wei Yongjun <weiyongjun@huaweicloud.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Add spi_device_id entries to silent following SPI warnings:
>
> SPI driver ad9467 has no spi_device_id for adi,ad9265
> SPI driver ad9467 has no spi_device_id for adi,ad9434
As for other drivers with similar pattern, please make use of
the spi_device_id->driver_data to provide the chip_info pointer
if the of_device_get_match_data() returns NULL.
A side effect of adding this spi_device_id table is that
it enables board file and other non firmware based forms
of device instantiation.
Jonathan
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/iio/adc/ad9467.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
> index 7534572f7475..67decbf2e119 100644
> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -447,12 +447,21 @@ static const struct of_device_id ad9467_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, ad9467_of_match);
>
> +static const struct spi_device_id ad9467_ids[] = {
> + { "ad9265", (kernel_ulong_t)&ad9467_chip_tbl[ID_AD9265] },
> + { "ad9434", (kernel_ulong_t)&ad9467_chip_tbl[ID_AD9434] },
> + { "ad9467", (kernel_ulong_t)&ad9467_chip_tbl[ID_AD9467] },
> + { },
> +};
> +MODULE_DEVICE_TABLE(spi, ad9467_ids);
> +
> static struct spi_driver ad9467_driver = {
> .driver = {
> .name = "ad9467",
> .of_match_table = ad9467_of_match,
> },
> .probe = ad9467_probe,
> + .id_table = ad9467_ids,
> };
> module_spi_driver(ad9467_driver);
>
prev parent reply other threads:[~2022-09-19 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 15:00 [PATCH] iio: adc: ad9467: Silent no spi_device_id warnings Wei Yongjun
2022-09-19 16:00 ` 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=20220919170048.0686b29c@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=weiyongjun@huaweicloud.com \
/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