From: Marek Vasut <marex@denx.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Marek Vasut <marex@denx.de>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Fabio Estevam <festevam@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Lucas Stach <l.stach@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
Paul Elder <paul.elder@ideasonboard.com>,
Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Richard Cochran <richardcochran@gmail.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
devicetree@vger.kernel.org
Subject: [PATCH v2 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Date: Mon, 20 Feb 2023 04:50:50 +0100 [thread overview]
Message-ID: <20230220035051.327847-3-marex@denx.de> (raw)
In-Reply-To: <20230220035051.327847-1-marex@denx.de>
This particular block can have DT subnodes describing the LVDS LDB
bridge. Instead of misusing simple-bus to scan for those nodes, do
the scan within the driver.
Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Paul Elder <paul.elder@ideasonboard.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Richard Zhu <hongxing.zhu@nxp.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
---
V2: - Turn this into 3/4
- Warn and continue in case of error
---
drivers/soc/imx/imx8m-blk-ctrl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 399cb85105a18..4f5736e612fb0 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -169,7 +169,9 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
{
const struct imx8m_blk_ctrl_data *bc_data;
struct device *dev = &pdev->dev;
+ struct platform_device *child;
struct imx8m_blk_ctrl *bc;
+ struct device_node *np;
void __iomem *base;
int i, ret;
@@ -310,6 +312,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
dev_set_drvdata(dev, bc);
+ for_each_child_of_node(dev->of_node, np) {
+ child = of_platform_device_create(np, NULL, dev);
+ if (child)
+ continue;
+ dev_warn(dev, "failed to create device for %pOF\n", np);
+ }
+
return 0;
cleanup_provider:
--
2.39.1
next prev parent reply other threads:[~2023-02-20 3:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 3:50 [PATCH v2 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Marek Vasut
2023-02-20 3:50 ` [PATCH v2 2/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB into DT example Marek Vasut
2023-02-21 11:37 ` Krzysztof Kozlowski
2023-02-20 3:50 ` Marek Vasut [this message]
2023-02-20 4:34 ` [PATCH v2 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them Liu Ying
2023-02-20 5:31 ` Marek Vasut
2023-02-20 3:50 ` [PATCH v2 4/4] arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl Marek Vasut
2023-02-20 4:27 ` Liu Ying
2023-02-20 4:26 ` [PATCH v2 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Liu Ying
2023-02-21 11:34 ` 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=20230220035051.327847-3-marex@denx.de \
--to=marex@denx.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.stach@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=paul.elder@ideasonboard.com \
--cc=peng.fan@nxp.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).