All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>
Cc: Saravana Kannan <saravanak@google.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH v2 2/2] drivers: bus: simple-pm-bus: Add support for probing simple bus only devices
Date: Thu,  2 Sep 2021 16:04:41 -0700	[thread overview]
Message-ID: <20210902230442.1515531-3-saravanak@google.com> (raw)
In-Reply-To: <20210902230442.1515531-1-saravanak@google.com>

The OF platform code sets up simple bus only devices (i.e. devices that
won't match with any other driver) to get probed by the simple-pm-bus to
keep fw_devlink from blocking probe() or sync_state() [1] callbacks of
other devices. There's no need to populate the child devices since the
OF platform code would do that anyway, so return early for these simple
bus only devices.

[1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Saravana Kannan <saravanak@google.com>
---
 drivers/bus/simple-pm-bus.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c
index 01a3d0cd08ed..91d52021b7f9 100644
--- a/drivers/bus/simple-pm-bus.c
+++ b/drivers/bus/simple-pm-bus.c
@@ -19,6 +19,13 @@ static int simple_pm_bus_probe(struct platform_device *pdev)
 	const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev);
 	struct device_node *np = pdev->dev.of_node;
 
+	/*
+	 * These are transparent bus devices (not simple-pm-bus matches) that
+	 * get populated automatically.  So, don't need to do anything more.
+	 */
+	if (pdev->driver_override)
+		return 0;
+
 	dev_dbg(&pdev->dev, "%s\n", __func__);
 
 	pm_runtime_enable(&pdev->dev);
-- 
2.33.0.153.gba50c8fa24-goog


  parent reply	other threads:[~2021-09-02 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 23:04 [PATCH v2 0/2] Fix simple-bus issues with fw_devlink Saravana Kannan
2021-09-02 23:04 ` [PATCH v2 1/2] of: platform: Make sure bus only devices get probed Saravana Kannan
2021-09-03  9:18   ` Ulf Hansson
2021-09-03 14:29     ` Geert Uytterhoeven
2021-09-03 17:09       ` Saravana Kannan
2021-09-03 19:06         ` Geert Uytterhoeven
2021-09-03 19:08           ` Saravana Kannan
2021-09-07 10:35       ` Ulf Hansson
2021-09-07 10:52         ` Geert Uytterhoeven
2021-09-07 11:02           ` Ulf Hansson
2021-09-02 23:04 ` Saravana Kannan [this message]
2021-09-03  9:14   ` [PATCH v2 2/2] drivers: bus: simple-pm-bus: Add support for probing simple bus only devices Ulf Hansson
2021-09-03 17:10     ` 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=20210902230442.1515531-3-saravanak@google.com \
    --to=saravanak@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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.