From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Lucas Stach <l.stach@pengutronix.de> Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>, djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com, kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, abelvesa@kernel.org, Peng Fan <peng.fan@nxp.com> Subject: Re: [PATCH V2 7/9] interconnect: imx: set of_node for interconnect provider Date: Wed, 29 Jun 2022 20:32:39 +0300 [thread overview] Message-ID: <YryMt4CfQNkIHwiV@pendragon.ideasonboard.com> (raw) In-Reply-To: <3c773637f626877832041d3065f387261ba70816.camel@pengutronix.de> On Wed, Jun 29, 2022 at 05:08:58PM +0200, Lucas Stach wrote: > Am Donnerstag, dem 16.06.2022 um 15:33 +0800 schrieb Peng Fan (OSS): > > From: Peng Fan <peng.fan@nxp.com> > > > > The provider device is created using platform_device_register_data in > > imx-bus driver, which not has of_node. With of_node set, it will be > > easy to support QoS settings. > > > That's a bit dangerous, as sharing a of_node between two devices can > lead to some reference counting issues IIRC, but then I also don't see > a good way to do this any differently. > > Regards, > Lucas > > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > > --- > > drivers/interconnect/imx/imx.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c > > index 1f16eedea21c..78557fe6da2c 100644 > > --- a/drivers/interconnect/imx/imx.c > > +++ b/drivers/interconnect/imx/imx.c > > @@ -264,6 +264,7 @@ int imx_icc_register(struct platform_device *pdev, > > provider->xlate = of_icc_xlate_onecell; > > provider->data = data; > > provider->dev = dev->parent; > > + provider->dev->of_node = dev->parent->of_node; Due to the previous line, provider->dev is equal to dev->parent, so doesn't this essentially do dev->parent->of_node = dev->parent->of_node; which is a no-op ? > > platform_set_drvdata(pdev, imx_provider); > > > > ret = icc_provider_add(provider); -- Regards, Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Lucas Stach <l.stach@pengutronix.de> Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>, djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com, kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, abelvesa@kernel.org, Peng Fan <peng.fan@nxp.com> Subject: Re: [PATCH V2 7/9] interconnect: imx: set of_node for interconnect provider Date: Wed, 29 Jun 2022 20:32:39 +0300 [thread overview] Message-ID: <YryMt4CfQNkIHwiV@pendragon.ideasonboard.com> (raw) In-Reply-To: <3c773637f626877832041d3065f387261ba70816.camel@pengutronix.de> On Wed, Jun 29, 2022 at 05:08:58PM +0200, Lucas Stach wrote: > Am Donnerstag, dem 16.06.2022 um 15:33 +0800 schrieb Peng Fan (OSS): > > From: Peng Fan <peng.fan@nxp.com> > > > > The provider device is created using platform_device_register_data in > > imx-bus driver, which not has of_node. With of_node set, it will be > > easy to support QoS settings. > > > That's a bit dangerous, as sharing a of_node between two devices can > lead to some reference counting issues IIRC, but then I also don't see > a good way to do this any differently. > > Regards, > Lucas > > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > > --- > > drivers/interconnect/imx/imx.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c > > index 1f16eedea21c..78557fe6da2c 100644 > > --- a/drivers/interconnect/imx/imx.c > > +++ b/drivers/interconnect/imx/imx.c > > @@ -264,6 +264,7 @@ int imx_icc_register(struct platform_device *pdev, > > provider->xlate = of_icc_xlate_onecell; > > provider->data = data; > > provider->dev = dev->parent; > > + provider->dev->of_node = dev->parent->of_node; Due to the previous line, provider->dev is equal to dev->parent, so doesn't this essentially do dev->parent->of_node = dev->parent->of_node; which is a no-op ? > > platform_set_drvdata(pdev, imx_provider); > > > > ret = icc_provider_add(provider); -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-29 17:33 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-16 7:33 [PATCH V2 0/9] interconnect: support i.MX8MP Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-16 7:33 ` [PATCH V2 1/9] dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-27 22:18 ` Rob Herring 2022-06-27 22:18 ` Rob Herring 2022-06-16 7:33 ` [PATCH V2 2/9] dt-bindings: interconnect: add fsl,imx8mp.h Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-27 22:19 ` Rob Herring 2022-06-27 22:19 ` Rob Herring 2022-06-16 7:33 ` [PATCH V2 3/9] interconnect: add device managed bulk API Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-16 7:33 ` [PATCH V2 4/9] interconnect: imx: fix max_node_id Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-16 7:33 ` [PATCH V2 5/9] interconnect: imx: set src node Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-16 7:33 ` [PATCH V2 6/9] interconnect: imx: introduce imx_icc_provider Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-16 7:33 ` [PATCH V2 7/9] interconnect: imx: set of_node for interconnect provider Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-29 15:08 ` Lucas Stach 2022-06-29 15:08 ` Lucas Stach 2022-06-29 17:32 ` Laurent Pinchart [this message] 2022-06-29 17:32 ` Laurent Pinchart 2022-07-03 8:43 ` Peng Fan (OSS) 2022-07-03 8:43 ` Peng Fan (OSS) 2022-07-02 12:48 ` Peng Fan 2022-07-02 12:48 ` Peng Fan 2022-06-16 7:33 ` [PATCH V2 8/9] interconnect: imx: configure NoC mode/prioriry/ext_control Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-28 17:57 ` Georgi Djakov 2022-06-28 17:57 ` Georgi Djakov 2022-07-02 12:41 ` Peng Fan 2022-07-02 12:41 ` Peng Fan 2022-06-29 15:14 ` Lucas Stach 2022-06-29 15:14 ` Lucas Stach 2022-07-02 12:50 ` Peng Fan 2022-07-02 12:50 ` Peng Fan 2022-06-16 7:33 ` [PATCH V2 9/9] interconnect: imx: Add platform driver for imx8mp Peng Fan (OSS) 2022-06-16 7:33 ` Peng Fan (OSS) 2022-06-28 17:58 ` Georgi Djakov 2022-06-28 17:58 ` Georgi Djakov 2022-06-29 15:17 ` Lucas Stach 2022-06-29 15:17 ` Lucas Stach 2022-07-02 12:51 ` Peng Fan 2022-07-02 12:51 ` Peng Fan
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=YryMt4CfQNkIHwiV@pendragon.ideasonboard.com \ --to=laurent.pinchart@ideasonboard.com \ --cc=Markus.Niebel@ew.tq-group.com \ --cc=abailon@baylibre.com \ --cc=abel.vesa@nxp.com \ --cc=abelvesa@kernel.org \ --cc=aford173@gmail.com \ --cc=devicetree@vger.kernel.org \ --cc=djakov@kernel.org \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=l.stach@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=marex@denx.de \ --cc=paul.elder@ideasonboard.com \ --cc=peng.fan@nxp.com \ --cc=peng.fan@oss.nxp.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: linkBe 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.