Skip to content

Commit

Permalink
iio: gyro: bmg160_spi: add of_match_table
Browse files Browse the repository at this point in the history
Add the missing of_match_table to bmg160_spi driver to enhance devicetree
compatibility.

Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://patch.msgid.link/20250306145740.32687-1-jerrysteve1101@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Jun Yan authored and Jonathan Cameron committed Mar 11, 2025
1 parent 352f4a6 commit 85a1159
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/iio/gyro/bmg160_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 85a1159

Please sign in to comment.