summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2016-12-19 13:10:39 +0100
committerJonathan Cameron <jic23@kernel.org>2016-12-30 17:20:14 +0000
commit2cc5b0df86dc2e8b3fa0309d145e6ab5f529eff7 (patch)
treef8ed7182d749c496a31f3a002f513e3e7cebd309
parentb0570bcee39a313aea693612d061d6417ab06a2e (diff)
downloadlinux-2cc5b0df86dc2e8b3fa0309d145e6ab5f529eff7.tar.gz
linux-2cc5b0df86dc2e8b3fa0309d145e6ab5f529eff7.tar.bz2
linux-2cc5b0df86dc2e8b3fa0309d145e6ab5f529eff7.zip
iio: dac: ad5593r: Add ACPI support
This patch adds the ACPI/PNP ID. The AD5592/3 driver core is already designed around the unified device property API. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/dac/ad5593r.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad5593r.c b/drivers/iio/dac/ad5593r.c
index dca158a88f47..fc11ea098f98 100644
--- a/drivers/iio/dac/ad5593r.c
+++ b/drivers/iio/dac/ad5593r.c
@@ -13,6 +13,7 @@
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/acpi.h>
#define AD5593R_MODE_CONF (0 << 4)
#define AD5593R_MODE_DAC_WRITE (1 << 4)
@@ -115,10 +116,17 @@ static const struct of_device_id ad5593r_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ad5593r_of_match);
+static const struct acpi_device_id ad5593r_acpi_match[] = {
+ {"ADS5593", },
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, ad5593r_acpi_match);
+
static struct i2c_driver ad5593r_driver = {
.driver = {
.name = "ad5593r",
.of_match_table = of_match_ptr(ad5593r_of_match),
+ .acpi_match_table = ACPI_PTR(ad5593r_acpi_match),
},
.probe = ad5593r_i2c_probe,
.remove = ad5593r_i2c_remove,