[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230327085401.pgnira5btzbgehb3@h-e2.ddg>
Date: Mon, 27 Mar 2023 11:54:01 +0300
From: Ivan Bornyakov <i.bornyakov@...rotek.ru>
To: Shawn Guo <shawnguo@...nel.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Saravana Kannan <saravanak@...gle.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Wolfram Sang <wsa@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Mark Brown <broonie@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
devicetree@...r.kernel.org, linux-spi@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] treewide: Fix instantiation of devices in DT overlays
Hi, Shawn!
On Mon, Mar 27, 2023 at 11:02:13AM +0800, Shawn Guo wrote:
> + Ivan
>
> On Fri, Mar 24, 2023 at 10:30:39AM +0100, Geert Uytterhoeven wrote:
> > When loading a DT overlay that creates a device, the device is not
> > instantiated, unless the DT overlay is unloaded and reloaded again.
> >
> > Saravana explains:
> > Basically for all overlays (I hope the function is only used for
> > overlays) we assume all nodes are NOT devices until they actually
> > get added as a device.
> >
> > Based on a patch by Saravana Kannan, which covered only platform and spi
> > devices.
> >
> > Fixes: 4a032827daa89350 ("of: property: Simplify of_link_to_phandle()")
> > Link: https://lore.kernel.org/r/CAGETcx_+rhHvaC_HJXGrr5_WAd2+k5f=rWYnkCZ6z5bGX-wj4w@mail.gmail.com
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > Acked-by: Mark Brown <broonie@...nel.org>
> > ---
> > v2:
> > - Add Acked-by,
> > - Drop RFC.
> > ---
> > drivers/bus/imx-weim.c | 1 +
> > drivers/i2c/i2c-core-of.c | 1 +
> > drivers/of/dynamic.c | 1 +
> > drivers/of/platform.c | 1 +
> > drivers/spi/spi.c | 1 +
> > 5 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> > index 36d42484142aede2..898e23a4231400fa 100644
> > --- a/drivers/bus/imx-weim.c
> > +++ b/drivers/bus/imx-weim.c
> > @@ -329,6 +329,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
> > "Failed to setup timing for '%pOF'\n", rd->dn);
> >
> > if (!of_node_check_flag(rd->dn, OF_POPULATED)) {
> > + rd->dn->fwnode.flags &= ~FWNODE_FLAG_NOT_DEVICE;
> > if (!of_platform_device_create(rd->dn, NULL, &pdev->dev)) {
> > dev_err(&pdev->dev,
> > "Failed to create child device '%pOF'\n",
>
> Ivan, so you were aware of that the device is not instantiated before
> this change?
>
I was not aware of that, thanks for warning me.
Will test in the near future.
Powered by blists - more mailing lists