Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: dac: ad5592r: 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>

authored by

Michael Hennerich and committed by
Jonathan Cameron
b0570bce 8afa505c

+8
+8
drivers/iio/dac/ad5592r.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/of.h> 15 15 #include <linux/spi/spi.h> 16 + #include <linux/acpi.h> 16 17 17 18 #define AD5592R_GPIO_READBACK_EN BIT(10) 18 19 #define AD5592R_LDAC_READBACK_EN BIT(6) ··· 149 148 }; 150 149 MODULE_DEVICE_TABLE(of, ad5592r_of_match); 151 150 151 + static const struct acpi_device_id ad5592r_acpi_match[] = { 152 + {"ADS5592", }, 153 + { }, 154 + }; 155 + MODULE_DEVICE_TABLE(acpi, ad5592r_acpi_match); 156 + 152 157 static struct spi_driver ad5592r_spi_driver = { 153 158 .driver = { 154 159 .name = "ad5592r", 155 160 .of_match_table = of_match_ptr(ad5592r_of_match), 161 + .acpi_match_table = ACPI_PTR(ad5592r_acpi_match), 156 162 }, 157 163 .probe = ad5592r_spi_probe, 158 164 .remove = ad5592r_spi_remove,