diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2019-03-18 16:14:14 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-04 21:20:52 +0200 |
commit | 94bceb3cf5d1bfc56c747f6a986b4d60989b0843 (patch) | |
tree | 08f0f5f2988e9ecda6b3397859c19c9be2ecde82 /drivers/iio | |
parent | staging: iio: adc: ad7192: Use read_avail for available attributes (diff) | |
download | linux-94bceb3cf5d1bfc56c747f6a986b4d60989b0843.tar.xz linux-94bceb3cf5d1bfc56c747f6a986b4d60989b0843.zip |
iio: gyro: bmg160: add device tree compatibility table
Add of_match_table.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/gyro/bmg160_i2c.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c index 90126a5a7663..934a092134f0 100644 --- a/drivers/iio/gyro/bmg160_i2c.c +++ b/drivers/iio/gyro/bmg160_i2c.c @@ -54,10 +54,19 @@ static const struct i2c_device_id bmg160_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, bmg160_i2c_id); +static const struct of_device_id bmg160_of_match[] = { + { .compatible = "bosch,bmg160" }, + { .compatible = "bosch,bmi055_gyro" }, + { } +}; + +MODULE_DEVICE_TABLE(of, bmg160_of_match); + static struct i2c_driver bmg160_i2c_driver = { .driver = { .name = "bmg160_i2c", .acpi_match_table = ACPI_PTR(bmg160_acpi_match), + .of_match_table = bmg160_of_match, .pm = &bmg160_pm_ops, }, .probe = bmg160_i2c_probe, |