From patchwork Mon Feb 20 03:50:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13146063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53874C636D6 for ; Mon, 20 Feb 2023 03:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yb65x0eglQOhpXkK0DKINabcNKiWotLZvpINzYyy4J4=; b=LaT1RtXTQhSVU8 PeRG0+k6WLgCWPjVM7LmEL/y0mmg8OK4EOEiKL6+KLhNcpA1mKACPc4HO0D1URV40Leh1VLDTfkud 5sfDBbB1lodsHNhN7ozSRIj5FlRyg+xh6GrrqKVHiDXlFgxnurULgerGJeb0DiwFlLYjfCs1MCT3G XPBpNGdem5CJJtYTLhXwusyjfLCsMEj8SrCtMyHtiI8gJ/hQ8CiCwfXFQfVAVDdVwcd+TS/fsCngo wpa1RJD2AstcAFMJoOmtWzlKLGqO6008zwYCPfqgLGO4X0biJ2IOkITg55slKIf2fKevFqD1qQFpC w9K8veUiyJ0gMGh++/8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pTxD9-002uvT-VR; Mon, 20 Feb 2023 03:51:32 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pTxCs-002usK-Kk for linux-arm-kernel@lists.infradead.org; Mon, 20 Feb 2023 03:51:17 +0000 Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E72DA857DC; Mon, 20 Feb 2023 04:51:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676865067; bh=BPUiVJ+7yinQifTeus3/lXFO6uiCyUkEUgB/v5vyxz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GS3FTU2yHEo+PpX6OUYgMtMHclPUWiC5zKwqbcGhtFn9jJfGKLUorX6zTTh7CfWSN mCblQl8BIoTuGpmAJMSprGVqa2nXF0VLXcXbofMLxMc1nwEXNhI+lHqkjaR3lL9MN/ h7H0QSpSCta2GvMQacD4/ET6Pu91pS+CWGPODejJGU3UCga/8NCza0yqJy8l2cGNSS 4rcn4ksY2Iq2yz/cVCnYZN+ySuAM1ut9phCK1zYz4NQH7CfGaN4RtsG/pjaVgZ9OU7 bNI8J/pdsmZ+GY/UFEPeC64QkkUNYQ6mKGC1+0LJWgKApPyok42la+e2LRz2TpJbNt yKl+GIp+QF4og== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , 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 Message-Id: <20230220035051.327847-3-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220035051.327847-1-marex@denx.de> References: <20230220035051.327847-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230219_195115_019232_C0EB78DC X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Liu Ying --- Cc: Alexander Stein Cc: Fabio Estevam Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: NXP Linux Team Cc: Paul Elder Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Richard Zhu Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo 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: