All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Wolfram Sang <wsa@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Rob Herring <robh@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>
Subject: [PATCH 0/2] devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays
Date: Tue, 20 Feb 2024 12:10:35 +0100	[thread overview]
Message-ID: <20240220111044.133776-1-herve.codina@bootlin.com> (raw)

Since commit 1a50d9403fb9 ("treewide: Fix probing of devices in DT
overlays"), the FWNODE_FLAG_NOT_DEVICE is set on nodes present in the
overlay. Having this flag set leads to some wrong devlink links.
For instance, some links can be created with a supplier set to a parent
device instead of the device itself.

This series clears the FWNODE_FLAG_NOT_DEVICE in some specific location
to fix the wrong links issues.
- device_add()
  When a device is added, the related fwnode (if any) is populated as
  a struct device. It makes sense to clear the flag at that point and so
  avoid differences between DT used with or without overlays.
- of_link_phandle()
  If the supplier device has a compatible string and 'is available', a
  device is going to be created soon to handle this node. In that case,
  to avoid a link created using the supplier parent device instead of
  the device itself, clearing the FWNODE_FLAG_NOT_DEVICE makes sense.

Best regards,
Hervé Codina

Herve Codina (2):
  driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is added
  of: property: fw_devlink: Fix links to supplier when created from
    phandles

 drivers/base/core.c   |  1 +
 drivers/of/property.c | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.43.0


             reply	other threads:[~2024-02-20 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 11:10 Herve Codina [this message]
2024-02-20 11:10 ` [PATCH 1/2] driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is added Herve Codina
2024-02-21  2:41   ` Saravana Kannan
2024-03-12 14:18     ` Herve Codina
2024-02-20 11:10 ` [PATCH 2/2] of: property: fw_devlink: Fix links to supplier when created from phandles Herve Codina
2024-02-21  2:40   ` Saravana Kannan
2024-02-21  8:51     ` Herve Codina
2024-03-05  7:14       ` Saravana Kannan
2024-03-21 11:59         ` Herve Codina
2024-03-23  2:00           ` Saravana Kannan
2024-04-08 14:40             ` Herve Codina
2024-04-08 23:17               ` Saravana Kannan

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=20240220111044.133776-1-herve.codina@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=shawnguo@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wsa@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 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.