Commit 43f9b204 authored by Stefan Popa's avatar Stefan Popa Committed by Jonathan Cameron
Browse files

staging: iio: adc: ad7606: Add OF device ID table



The driver does not have a struct of_device_id table, but supported
devices are registered via Device Trees. This patch adds and OF device
ID table.

Signed-off-by: default avatarStefan Popa <stefan.popa@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 6620585a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -91,12 +91,22 @@ static const struct platform_device_id ad7606_driver_ids[] = {

MODULE_DEVICE_TABLE(platform, ad7606_driver_ids);

static const struct of_device_id ad7606_of_match[] = {
	{ .compatible = "adi,ad7605-4" },
	{ .compatible = "adi,ad7606-4" },
	{ .compatible = "adi,ad7606-6" },
	{ .compatible = "adi,ad7606-8" },
	{ },
};
MODULE_DEVICE_TABLE(of, ad7606_of_match);

static struct platform_driver ad7606_driver = {
	.probe = ad7606_par_probe,
	.id_table = ad7606_driver_ids,
	.driver = {
		.name	 = "ad7606",
		.pm	 = AD7606_PM_OPS,
		.of_match_table = ad7606_of_match,
	},
};

+10 −0
Original line number Diff line number Diff line
@@ -58,9 +58,19 @@ static const struct spi_device_id ad7606_id[] = {
};
MODULE_DEVICE_TABLE(spi, ad7606_id);

static const struct of_device_id ad7606_of_match[] = {
	{ .compatible = "adi,ad7605-4" },
	{ .compatible = "adi,ad7606-4" },
	{ .compatible = "adi,ad7606-6" },
	{ .compatible = "adi,ad7606-8" },
	{ },
};
MODULE_DEVICE_TABLE(of, ad7606_of_match);

static struct spi_driver ad7606_driver = {
	.driver = {
		.name = "ad7606",
		.of_match_table = ad7606_of_match,
		.pm = AD7606_PM_OPS,
	},
	.probe = ad7606_spi_probe,