* [PATCH v2] iio: accel: bma220: publish the SPI driver ACPI alias
@ 2026-09-20 3:33 Pengpeng Hou
2026-09-25 1:51 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-09-20 3:33 UTC (permalink / raw)
To: petre.rodan
Cc: jic23, dlechner, nuno.sa, andy, linux-iio, linux-kernel,
tiberiu.a.breana, andriy.shevchenko, hppiscas
The SPI driver advertises an ACPI match for BMA0220 but does not export
that table. A modular build therefore lacks the ACPI alias used to load
the driver when the device is enumerated through ACPI.
Export the ACPI table. Move the existing SPI export next to its SPI ID
table so each export is adjacent to the table it describes.
The issue was found by our static-analysis tool.
Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
Changes since v1:
https://lore.kernel.org/all/20260905133901.66016-1-hppiscas@163.com/
Place the SPI export immediately after the SPI table as Jonathan and
Andy requested; use the full author name.
drivers/iio/accel/bma220_spi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index d6c1087cc3c0..d7a95289df48 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -28,12 +28,13 @@ static const struct spi_device_id bma220_spi_id[] = {
{ .name = "bma220" },
{ }
};
+MODULE_DEVICE_TABLE(spi, bma220_spi_id);
static const struct acpi_device_id bma220_acpi_id[] = {
{ "BMA0220", 0 },
{ }
};
-MODULE_DEVICE_TABLE(spi, bma220_spi_id);
+MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);
static const struct of_device_id bma220_of_spi_match[] = {
{ .compatible = "bosch,bma220" },
base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] iio: accel: bma220: publish the SPI driver ACPI alias
2026-09-20 3:33 [PATCH v2] iio: accel: bma220: publish the SPI driver ACPI alias Pengpeng Hou
@ 2026-09-25 1:51 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2026-09-25 1:51 UTC (permalink / raw)
To: Pengpeng Hou
Cc: petre.rodan, dlechner, nuno.sa, andy, linux-iio, linux-kernel,
tiberiu.a.breana, andriy.shevchenko
On Sun, 20 Sep 2026 11:33:58 +0800
Pengpeng Hou <hppiscas@163.com> wrote:
> The SPI driver advertises an ACPI match for BMA0220 but does not export
> that table. A modular build therefore lacks the ACPI alias used to load
> the driver when the device is enumerated through ACPI.
>
> Export the ACPI table. Move the existing SPI export next to its SPI ID
> table so each export is adjacent to the table it describes.
>
> The issue was found by our static-analysis tool.
>
> Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")
> Assisted-by: gpt 5
Updated to LLM and patch applied.
> Signed-off-by: Pengpeng Hou <hppiscas@163.com>
> ---
> Changes since v1:
> https://lore.kernel.org/all/20260905133901.66016-1-hppiscas@163.com/
> Place the SPI export immediately after the SPI table as Jonathan and
> Andy requested; use the full author name.
>
> drivers/iio/accel/bma220_spi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
> index d6c1087cc3c0..d7a95289df48 100644
> --- a/drivers/iio/accel/bma220_spi.c
> +++ b/drivers/iio/accel/bma220_spi.c
> @@ -28,12 +28,13 @@ static const struct spi_device_id bma220_spi_id[] = {
> { .name = "bma220" },
> { }
> };
> +MODULE_DEVICE_TABLE(spi, bma220_spi_id);
>
> static const struct acpi_device_id bma220_acpi_id[] = {
> { "BMA0220", 0 },
> { }
> };
> -MODULE_DEVICE_TABLE(spi, bma220_spi_id);
> +MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);
>
> static const struct of_device_id bma220_of_spi_match[] = {
> { .compatible = "bosch,bma220" },
>
> base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-25 1:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-20 3:33 [PATCH v2] iio: accel: bma220: publish the SPI driver ACPI alias Pengpeng Hou
2026-09-25 1:51 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®