[PATCH] iio: accel: bma220: Publish the SPI driver's ACPI alias

hpp.iscas posted 1 patch 2 weeks, 6 days ago
drivers/iio/accel/bma220_spi.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] iio: accel: bma220: Publish the SPI driver's ACPI alias
Posted by hpp.iscas 2 weeks, 6 days ago
The BMA220 SPI driver registers an ACPI match table containing BMA0220,
but exports only its SPI and OF tables. SPI devices with an ACPI
companion emit an ACPI modalias, which neither existing table covers.

Publish the ACPI table without changing either of the other matches.

Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")
Signed-off-by: hpp.iscas <hppiscas@163.com>
---
 drivers/iio/accel/bma220_spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index d6c1087..13b156b 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -33,6 +33,7 @@ static const struct acpi_device_id bma220_acpi_id[] = {
 	{ "BMA0220", 0 },
 	{ }
 };
+MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);
 MODULE_DEVICE_TABLE(spi, bma220_spi_id);
 
 static const struct of_device_id bma220_of_spi_match[] = {
Re: [PATCH] iio: accel: bma220: Publish the SPI driver's ACPI alias
Posted by Andy Shevchenko 2 weeks, 3 days ago
On Sat, Sep 05, 2026 at 09:39:01PM +0800, hpp.iscas wrote:
> The BMA220 SPI driver registers an ACPI match table containing BMA0220,
> but exports only its SPI and OF tables. SPI devices with an ACPI
> companion emit an ACPI modalias, which neither existing table covers.
> 
> Publish the ACPI table without changing either of the other matches.

...

> static const struct acpi_device_id bma220_acpi_id[] = {

>  	{ "BMA0220", 0 },
>  	{ }
>  };
> +MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);

>  MODULE_DEVICE_TABLE(spi, bma220_spi_id);

Ouch! This one needs to be moved closer to the respective (SPI) ID table
definition.

>  static const struct of_device_id bma220_of_spi_match[] = {

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] iio: accel: bma220: Publish the SPI driver's ACPI alias
Posted by Jonathan Cameron 2 weeks, 6 days ago
On Sat,  5 Sep 2026 21:39:01 +0800
"hpp.iscas" <hppiscas@163.com> wrote:

> The BMA220 SPI driver registers an ACPI match table containing BMA0220,
> but exports only its SPI and OF tables. SPI devices with an ACPI
> companion emit an ACPI modalias, which neither existing table covers.
> 
> Publish the ACPI table without changing either of the other matches.
> 
> Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")
> Signed-off-by: hpp.iscas <hppiscas@163.com>
Same issue. I see Guenter also replied with similar. We need something
more 'known' as an identity.  I see you sent quite a few patches out on
similar issues.  I'd suggest perhaps focusing on just getting one or two
through the process as it will save time on duplicated feedback like this.
You can scale up later!

one other thing inline.
> ---
>  drivers/iio/accel/bma220_spi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
> index d6c1087..13b156b 100644
> --- a/drivers/iio/accel/bma220_spi.c
> +++ b/drivers/iio/accel/bma220_spi.c
> @@ -33,6 +33,7 @@ static const struct acpi_device_id bma220_acpi_id[] = {
>  	{ "BMA0220", 0 },

This line has changed suggesting you are working on on old tree.  Give
7.3-rc1 is out, that is a good base for new pathes at this point.

>  	{ }
>  };
> +MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);
>  MODULE_DEVICE_TABLE(spi, bma220_spi_id);
This line should be under the spi_device_id table, so please move it in this
patch as well as adding the acpi one.


>  
>  static const struct of_device_id bma220_of_spi_match[] = {
>