]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
dm: clarify DM_FLAG_PROBE_AFTER_BIND behaviour
authorCaleb Connolly <caleb.connolly@linaro.org>
Fri, 17 Jan 2025 07:28:56 +0000 (08:28 +0100)
committerTom Rini <trini@konsulko.com>
Sun, 30 Mar 2025 15:09:04 +0000 (09:09 -0600)
The DM_FLAG_PROBE_AFTER_BIND flag only makes sense on a per-device
basis, however recently added documentation as well as some confused
drivers imply that it might be added to a driver definition, this does
nothing.

Clarify the new documentation and expand on the comment by the
definition to point people in the right direction.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@amd.com>
doc/develop/driver-model/design.rst
include/dm/device.h

index 92f638a02047cd31e2ff269fc428a55d59e814c1..30093737200ccc5d34a0c713eac0a6cccc0829ae 100644 (file)
@@ -843,8 +843,10 @@ steps (see device_probe()):
       activated and 'known' by the uclass.
 
 For some platforms, certain devices must be probed to get the platform into
-a working state. To help with this, drivers marked with DM_FLAG_PROBE_AFTER_BIND
-will be probed immediately after all devices are bound. For now, this happens in
+a working state. To help with this, devices marked with DM_FLAG_PROBE_AFTER_BIND
+will be probed immediately after all devices are bound. This flag must be set
+on the device in its ``bind()`` function with
+``dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND)``. For now, this happens in
 SPL, before relocation and after relocation. See the call to ``dm_autoprobe()``
 for where this is done.
 
index add67f9ec06f9ed43fc5a7f8899debad6514a421..678cd83c27163f5b94616dc1d4f9e2561dad9cbd 100644 (file)
@@ -81,7 +81,10 @@ struct driver_info;
  */
 #define DM_FLAG_VITAL                  (1 << 14)
 
-/* Device must be probed after it was bound */
+/* Device must be probed after it was bound. This flag is per-device and does
+ * nothing if set on a U_BOOT_DRIVER() definition. Apply it with
+ * dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND) in the devices bind function.
+ */
 #define DM_FLAG_PROBE_AFTER_BIND       (1 << 15)
 
 /*