Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: accel: sca3300: Silent no spi_device_id warning
@ 2022-09-19 15:00 Wei Yongjun
  2022-09-19 16:02 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2022-09-19 15:00 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, LI Qingwu, Tomas Melin,
	Nuno Sá
  Cc: Wei Yongjun, linux-iio

From: Wei Yongjun <weiyongjun1@huawei.com>

Add spi_device_id entries to silent following SPI warning:

SPI driver sca3300 has no spi_device_id for murata,scl3300

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/iio/accel/sca3300.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c
index eaa0c9cfda44..693fbe8d6cb9 100644
--- a/drivers/iio/accel/sca3300.c
+++ b/drivers/iio/accel/sca3300.c
@@ -679,12 +679,20 @@ static const struct of_device_id sca3300_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, sca3300_dt_ids);
 
+static const struct spi_device_id sca3300_ids[] = {
+	{ "sca3300" },
+	{ "scl3300" },
+	{ },
+};
+MODULE_DEVICE_TABLE(spi, sca3300_ids);
+
 static struct spi_driver sca3300_driver = {
-	.driver = {
+	.driver   = {
 		.name		= SCA3300_ALIAS,
 		.of_match_table = sca3300_dt_ids,
 	},
-	.probe	= sca3300_probe,
+	.probe	  = sca3300_probe,
+	.id_table = sca3300_ids,
 };
 module_spi_driver(sca3300_driver);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: accel: sca3300: Silent no spi_device_id warning
  2022-09-19 15:00 [PATCH] iio: accel: sca3300: Silent no spi_device_id warning Wei Yongjun
@ 2022-09-19 16:02 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2022-09-19 16:02 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Lars-Peter Clausen, LI Qingwu, Tomas Melin, Nuno Sá,
	Wei Yongjun, linux-iio

On Mon, 19 Sep 2022 15:00:18 +0000
Wei Yongjun <weiyongjun@huaweicloud.com> wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
Hi Wei Yongjun

"Silence" rather than "Silent" in the patch title.
> 
> Add spi_device_id entries to silent following SPI warning:
silence

Please add the extra info that Lars asked for to all these patches:
the main aim here is to ensure driver module autoloading works.

Code in this patch is fine.

Jonathan

> 
> SPI driver sca3300 has no spi_device_id for murata,scl3300
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/iio/accel/sca3300.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c
> index eaa0c9cfda44..693fbe8d6cb9 100644
> --- a/drivers/iio/accel/sca3300.c
> +++ b/drivers/iio/accel/sca3300.c
> @@ -679,12 +679,20 @@ static const struct of_device_id sca3300_dt_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, sca3300_dt_ids);
>  
> +static const struct spi_device_id sca3300_ids[] = {
> +	{ "sca3300" },
> +	{ "scl3300" },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(spi, sca3300_ids);
> +
>  static struct spi_driver sca3300_driver = {
> -	.driver = {
> +	.driver   = {
>  		.name		= SCA3300_ALIAS,
>  		.of_match_table = sca3300_dt_ids,
>  	},
> -	.probe	= sca3300_probe,
> +	.probe	  = sca3300_probe,
> +	.id_table = sca3300_ids,
>  };
>  module_spi_driver(sca3300_driver);
>  


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-19 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 15:00 [PATCH] iio: accel: sca3300: Silent no spi_device_id warning Wei Yongjun
2022-09-19 16:02 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox