All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: linux-iio@vger.kernel.org
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Hartley Sweeten <hsweeten@visionengravers.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] iio: adc: ep93xx: Add OF support
Date: Wed, 14 Dec 2022 23:20:24 +0100	[thread overview]
Message-ID: <20221214222024.951984-2-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20221214222024.951984-1-alexander.sverdlin@gmail.com>

Prepare for EP93xx conversion to DT.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 drivers/iio/adc/ep93xx_adc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
index fd5a9404c8dc..e530a37180e1 100644
--- a/drivers/iio/adc/ep93xx_adc.c
+++ b/drivers/iio/adc/ep93xx_adc.c
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 /*
  * This code could benefit from real HR Timers, but jiffy granularity would
@@ -227,9 +228,18 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id ep93xx_adc_of_ids[] = {
+	{ .compatible = "cirrus,ep9301-adc" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids);
+#endif
+
 static struct platform_driver ep93xx_adc_driver = {
 	.driver = {
 		.name = "ep93xx-adc",
+		.of_match_table = of_match_ptr(ep93xx_adc_of_ids),
 	},
 	.probe = ep93xx_adc_probe,
 	.remove = ep93xx_adc_remove,
-- 
2.37.3


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: linux-iio@vger.kernel.org
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Hartley Sweeten <hsweeten@visionengravers.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] iio: adc: ep93xx: Add OF support
Date: Wed, 14 Dec 2022 23:20:24 +0100	[thread overview]
Message-ID: <20221214222024.951984-2-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20221214222024.951984-1-alexander.sverdlin@gmail.com>

Prepare for EP93xx conversion to DT.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 drivers/iio/adc/ep93xx_adc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
index fd5a9404c8dc..e530a37180e1 100644
--- a/drivers/iio/adc/ep93xx_adc.c
+++ b/drivers/iio/adc/ep93xx_adc.c
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 /*
  * This code could benefit from real HR Timers, but jiffy granularity would
@@ -227,9 +228,18 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id ep93xx_adc_of_ids[] = {
+	{ .compatible = "cirrus,ep9301-adc" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids);
+#endif
+
 static struct platform_driver ep93xx_adc_driver = {
 	.driver = {
 		.name = "ep93xx-adc",
+		.of_match_table = of_match_ptr(ep93xx_adc_of_ids),
 	},
 	.probe = ep93xx_adc_probe,
 	.remove = ep93xx_adc_remove,
-- 
2.37.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-14 22:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 22:20 [PATCH 1/2] dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Alexander Sverdlin
2022-12-14 22:20 ` Alexander Sverdlin
2022-12-14 22:20 ` Alexander Sverdlin [this message]
2022-12-14 22:20   ` [PATCH 2/2] iio: adc: ep93xx: Add OF support Alexander Sverdlin
2022-12-15  8:42 ` [PATCH 1/2] dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Krzysztof Kozlowski
2022-12-15  8:42   ` Krzysztof Kozlowski
2022-12-15 13:24 ` Rob Herring
2022-12-15 13:24   ` Rob Herring
2022-12-15 16:18 ` Rob Herring
2022-12-15 16:18   ` Rob Herring
2022-12-15 16:25   ` Alexander Sverdlin
2022-12-15 16:25     ` Alexander Sverdlin
2022-12-16 11:40     ` Krzysztof Kozlowski
2022-12-16 11:40       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221214222024.951984-2-alexander.sverdlin@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hsweeten@visionengravers.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.