diff options
author | Grégor Boirie <gregor.boirie@parrot.com> | 2016-03-01 11:31:37 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-03-05 14:41:00 +0000 |
commit | 7a948c5e05febd23ee8e61db95c3dc96737fe17f (patch) | |
tree | 233803fccbc18ca751aced4dd8620aaca9e4c37a /drivers/iio/pressure/ms5611_spi.c | |
parent | 844a65636793d284526ff7d623ef477ed4473ab4 (diff) | |
download | talos-obmc-linux-7a948c5e05febd23ee8e61db95c3dc96737fe17f.tar.gz talos-obmc-linux-7a948c5e05febd23ee8e61db95c3dc96737fe17f.zip |
iio:pressure:ms5611: complete DT support
Add device-tree ID tables and document bindings.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure/ms5611_spi.c')
-rw-r--r-- | drivers/iio/pressure/ms5611_spi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c index 5cc009e85f0e..7ec0c6498f93 100644 --- a/drivers/iio/pressure/ms5611_spi.c +++ b/drivers/iio/pressure/ms5611_spi.c @@ -12,6 +12,7 @@ #include <linux/delay.h> #include <linux/module.h> #include <linux/spi/spi.h> +#include <linux/of_device.h> #include "ms5611.h" @@ -114,6 +115,17 @@ static int ms5611_spi_remove(struct spi_device *spi) return ms5611_remove(spi_get_drvdata(spi)); } +#if defined(CONFIG_OF) +static const struct of_device_id ms5611_spi_matches[] = { + { .compatible = "meas,ms5611" }, + { .compatible = "ms5611" }, + { .compatible = "meas,ms5607" }, + { .compatible = "ms5607" }, + { } +}; +MODULE_DEVICE_TABLE(of, ms5611_spi_matches); +#endif + static const struct spi_device_id ms5611_id[] = { { "ms5611", MS5611 }, { "ms5607", MS5607 }, @@ -124,6 +136,7 @@ MODULE_DEVICE_TABLE(spi, ms5611_id); static struct spi_driver ms5611_driver = { .driver = { .name = "ms5611", + .of_match_table = of_match_ptr(ms5611_spi_matches) }, .id_table = ms5611_id, .probe = ms5611_spi_probe, |