mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/8] ARM: imx6sx: udoo-neo: port to driver model
@ 2023-01-13 11:34 Oleksij Rempel
  2023-01-13 11:34 ` [PATCH v1 2/8] ARM: imx6sx: udoo-neo: enable deep probe support Oleksij Rempel
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Oleksij Rempel @ 2023-01-13 11:34 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Port board code to the driver model

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boards/udoo-neo/board.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/udoo-neo/board.c b/arch/arm/boards/udoo-neo/board.c
index 5964e92159..3bed20ae50 100644
--- a/arch/arm/boards/udoo-neo/board.c
+++ b/arch/arm/boards/udoo-neo/board.c
@@ -5,13 +5,21 @@
 #include <init.h>
 #include <linux/clk.h>
 
-static int imx6sx_udoneo_coredevices_init(void)
+static int imx6sx_udoneo_probe(struct device *dev)
 {
-	if (!of_machine_is_compatible("fsl,imx6sx-udoo-neo"))
-		return 0;
-
 	barebox_set_hostname("mx6sx-udooneo");
 
 	return 0;
 }
-coredevice_initcall(imx6sx_udoneo_coredevices_init);
+
+static const struct of_device_id imx6sx_udoneo_of_match[] = {
+	{ .compatible = "fsl,imx6sx-udoo-neo" },
+	{ /* sentinel */ },
+};
+
+static struct driver imx6sx_udoneo_driver = {
+	.name = "board-udoo-neo",
+	.probe = imx6sx_udoneo_probe,
+	.of_compatible = imx6sx_udoneo_of_match,
+};
+postcore_platform_driver(imx6sx_udoneo_driver);
-- 
2.30.2




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-16 12:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 11:34 [PATCH v1 1/8] ARM: imx6sx: udoo-neo: port to driver model Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 2/8] ARM: imx6sx: udoo-neo: enable deep probe support Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 3/8] ARM: imx6sx: udoo-neo: fix board compatible Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 4/8] ARM: imx6sx: udoo-neo: configure GPIO pins for board auto detection Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 5/8] ARM: imx6sx: udoo-neo: add version detection support Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 6/8] ARM: imx6sx: udoo-neo: enable memory size auto detection Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 7/8] ARM: imx6sx: udoo-neo: fix gpt timer configuration Oleksij Rempel
2023-01-13 11:34 ` [PATCH v1 8/8] ARM: imx6sx: udoo-neo: add barebox update handler support Oleksij Rempel
2023-01-16 12:13 ` [PATCH v1 1/8] ARM: imx6sx: udoo-neo: port to driver model Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox