iio: gyro: bmg160_spi: add of_match_table
PATCH v3 1/1 iio: gyro: bmg160_spi: add of_match_table
Add the missing of_match_table to bmg160_spi
driver to enhance device tree compatibility.
---
Changes in v3
- Adjust the content of the commit message; there are no code changes.
- Link to v2: https://lore.kernel.org/linux-iio/[email protected]/
Changes in v2
- Fix a syntax error (a missing comma after the .of_match_table = bmg160_of_match).
- Fix the style issues found by checkpatch.pl.
- Link to v1: https://lore.kernel.org/linux-iio/[email protected]/
--- drivers/iio/gyro/bmg160_spi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/iio/gyro/bmg160_spi.c +10 -0
@@ -41,9 +41,19 @@ static const struct spi_device_id bmg160_spi_id[] = {MODULE_DEVICE_TABLE (spi, bmg160_spi_id); +static const struct of_device_id bmg160_of_match[] = { + { .compatible ="bosch,bmg160" }, + { .compatible ="bosch,bmi055_gyro" }, + { .compatible ="bosch,bmi088_gyro" }, + { } +}; + +MODULE_DEVICE_TABLE (of, bmg160_of_match); +static struct spi_driver bmg160_spi_driver = { .driver = { .name ="bmg160_spi" , + .of_match_table = bmg160_of_match, .pm = &bmg160_pm_ops, }, .probe = bmg160_spi_probe,
Signature · 1 line
2.48.1
Quoted 6 lines · Jun Yan
Add the missing
of_match_tabletobmg160_spi
driver to enhance device tree compatibility.Signed-off-by Jun Yan <[email protected]>---
LGTM
Quoted 42 lines
Changes in v3
- Adjust the content of the commit message; there are no code changes.
- Link to v2: https://lore.kernel.org/linux-iio/[email protected]/Changes in v2
- Fix a syntax error (a missing comma after the .of_match_table =bmg160_of_match).
- Fix the style issues found by checkpatch.pl.
- Link to v1: https://lore.kernel.org/linux-iio/[email protected]/--- drivers/iio/gyro/bmg160_spi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/iio/gyro/bmg160_spi.c +10
-0@@ -41,9 +41,19 @@ static const struct spi_device_id bmg160_spi_id[] = {MODULE_DEVICE_TABLE (spi, bmg160_spi_id); +static const struct of_device_id bmg160_of_match[] = { + { .compatible ="bosch,bmg160" }, + { .compatible ="bosch,bmi055_gyro" }, + { .compatible ="bosch,bmi088_gyro" }, + { } +}; + +MODULE_DEVICE_TABLE (of, bmg160_of_match); +static struct spi_driver bmg160_spi_driver = { .driver = { .name ="bmg160_spi" , + .of_match_table = bmg160_of_match, .pm = &bmg160_pm_ops, }, .probe = bmg160_spi_probe,Signature · 1 line
2.48.1
Jonathan Cameron
maintainerQuoted 3 lines · On Fri, 7 Mar 2025 00:46:29 -0300 Marcelo Schmitt <[email protected]>…
Quoted 2 lines · Jun Yan
Add the missing
of_match_tabletobmg160_spi
driver to enhance device tree compatibility.
Wrap commit messages to 75 chars.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Jun Yan <[email protected]>---
LGTM
Reviewed-by Marcelo Schmitt <[email protected]>
Applied with commit message wrap tweaked. Initially applied to the testing branch of iio.git to give some exposure to the 0-day bot.
Thanks,
Jonathan
Quoted 43 lines
Quoted 43 lines
Changes in v3
- Adjust the content of the commit message; there are no code changes.
- Link to v2: https://lore.kernel.org/linux-iio/[email protected]/Changes in v2
- Fix a syntax error (a missing comma after the .of_match_table =bmg160_of_match).
- Fix the style issues found by checkpatch.pl.
- Link to v1: https://lore.kernel.org/linux-iio/[email protected]/--- drivers/iio/gyro/bmg160_spi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/iio/gyro/bmg160_spi.c +10
-0@@ -41,9 +41,19 @@ static const struct spi_device_id bmg160_spi_id[] = {MODULE_DEVICE_TABLE (spi, bmg160_spi_id); +static const struct of_device_id bmg160_of_match[] = { + { .compatible ="bosch,bmg160" }, + { .compatible ="bosch,bmi055_gyro" }, + { .compatible ="bosch,bmi088_gyro" }, + { } +}; + +MODULE_DEVICE_TABLE (of, bmg160_of_match); +static struct spi_driver bmg160_spi_driver = { .driver = { .name ="bmg160_spi" , + .of_match_table = bmg160_of_match, .pm = &bmg160_pm_ops, }, .probe = bmg160_spi_probe,Signature · 1 line
2.48.1