The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Danilo Krummrich <dakr@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	driver-core@lists.linux.dev,  linux-kernel@vger.kernel.org
Subject: [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS
Date: Sun, 26 Jul 2026 22:31:41 -0700	[thread overview]
Message-ID: <ambsuv_6mCK8U9IP@google.com> (raw)

Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update
driver_allows_async_probing() to allow asynchronous probing for drivers
marked with this type.

While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in
preference. Subsystems that require asynchronous probing (such as slow
legacy buses) need a dedicated probe type to guarantee asynchronous
execution.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

I am planning to rework serio and gameport subsystems to rely on
asynchronous probing instead of rolling their own implementations.

 drivers/base/dd.c             | 1 +
 include/linux/device/driver.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 60c005223844..34df7b4416ac 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -936,6 +936,7 @@ __setup("driver_async_probe=", save_async_options);
 static bool driver_allows_async_probing(const struct device_driver *drv)
 {
 	switch (drv->probe_type) {
+	case PROBE_FORCE_ASYNCHRONOUS:
 	case PROBE_PREFER_ASYNCHRONOUS:
 		return true;
 
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 768a1334c0a1..4b3901a35e85 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -48,6 +48,7 @@ enum probe_type {
 	PROBE_DEFAULT_STRATEGY,
 	PROBE_PREFER_ASYNCHRONOUS,
 	PROBE_FORCE_SYNCHRONOUS,
+	PROBE_FORCE_ASYNCHRONOUS,
 };
 
 /**
-- 
2.55.0.229.g6434b31f56-goog


-- 
Dmitry

             reply	other threads:[~2026-07-27  5:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27  5:31 Dmitry Torokhov [this message]
2026-07-27  5:40 ` [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS Greg Kroah-Hartman
2026-07-27  5:54   ` Dmitry Torokhov
2026-07-27  6:25     ` Greg Kroah-Hartman

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=ambsuv_6mCK8U9IP@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox