diff options
author | Robert Yang <decatf@gmail.com> | 2019-03-04 10:19:12 -0500 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-04 20:19:52 +0100 |
commit | 3b866fd28ff17b8d7ea8ef6b109618a7f2cc1042 (patch) | |
tree | 3539e1d50547f29a076812c70bcfad0aa481d68e /drivers/iio/accel | |
parent | 0d90fe4786cb8542b900257b4fa7316cbdd9d01f (diff) | |
download | linux-3b866fd28ff17b8d7ea8ef6b109618a7f2cc1042.tar.bz2 |
iio: accel: kxcjk1013: Add device tree support
Add device tree support for kxcjk-1013 accelerometer sensors.
Signed-off-by: Robert Yang <decatf@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r-- | drivers/iio/accel/kxcjk-1013.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 7096e577b23f..a9e98fdb8b23 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1510,10 +1510,20 @@ static const struct i2c_device_id kxcjk1013_id[] = { MODULE_DEVICE_TABLE(i2c, kxcjk1013_id); +static const struct of_device_id kxcjk1013_of_match[] = { + { .compatible = "kionix,kxcjk1013", }, + { .compatible = "kionix,kxcj91008", }, + { .compatible = "kionix,kxtj21009", }, + { .compatible = "kionix,kxtf9", }, + { } +}; +MODULE_DEVICE_TABLE(of, kxcjk1013_of_match); + static struct i2c_driver kxcjk1013_driver = { .driver = { .name = KXCJK1013_DRV_NAME, .acpi_match_table = ACPI_PTR(kx_acpi_match), + .of_match_table = kxcjk1013_of_match, .pm = &kxcjk1013_pm_ops, }, .probe = kxcjk1013_probe, |