lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Nov 2020 12:07:47 +0200
From:   Alexandru Ardelean <alexandru.ardelean@...log.com>
To:     <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-iio@...r.kernel.org>
CC:     <robh+dt@...nel.org>, <jic23@...nel.org>,
        <andy.shevchenko@...il.com>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: [PATCH v2 3/4] iio: adc: ad7887: add OF match table

This will make the driver probe-able via device-tree and ACPI via PRP0001.
While the SPI match table may be sufficient, this should extend the cover
of this driver being probed by other methods.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
---
 drivers/iio/adc/ad7887.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c
index c28f704301d9..eb3a5b0080ee 100644
--- a/drivers/iio/adc/ad7887.c
+++ b/drivers/iio/adc/ad7887.c
@@ -341,9 +341,16 @@ static const struct spi_device_id ad7887_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ad7887_id);
 
+static const struct of_device_id ad7887_of_match[] = {
+	{ .compatible = "adi,ad7887" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, ad7887_of_match);
+
 static struct spi_driver ad7887_driver = {
 	.driver = {
 		.name	= "ad7887",
+		.of_match_table	= ad7887_of_match,
 	},
 	.probe		= ad7887_probe,
 	.id_table	= ad7887_id,
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ