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

iio: humidity: Support acpi probe for hts211

Support driver probe by reading unique HID on systems based on ACPI instead
of DT compatible strings.

Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Shrirang Bagul and committed by
Jonathan Cameron
25fc503e 9d317724

+8
+8
drivers/iio/humidity/hts221_i2c.c
··· 10 10 11 11 #include <linux/kernel.h> 12 12 #include <linux/module.h> 13 + #include <linux/acpi.h> 13 14 #include <linux/i2c.h> 14 15 #include <linux/slab.h> 15 16 #include "hts221.h" ··· 84 83 return hts221_probe(iio_dev); 85 84 } 86 85 86 + static const struct acpi_device_id hts221_acpi_match[] = { 87 + {"SMO9100", 0}, 88 + { }, 89 + }; 90 + MODULE_DEVICE_TABLE(acpi, hts221_acpi_match); 91 + 87 92 static const struct of_device_id hts221_i2c_of_match[] = { 88 93 { .compatible = "st,hts221", }, 89 94 {}, ··· 106 99 .driver = { 107 100 .name = "hts221_i2c", 108 101 .of_match_table = of_match_ptr(hts221_i2c_of_match), 102 + .acpi_match_table = ACPI_PTR(hts221_acpi_match), 109 103 }, 110 104 .probe = hts221_i2c_probe, 111 105 .id_table = hts221_i2c_id_table,