Merge branch 'buildman' of git://git.denx.de/u-boot-x86
[oweals/u-boot.git] / include / dm / uclass-internal.h
index 1434db3eb4c75f5cacc4b219b1dff7090b8aace5..ae2a93d7d4da7a806826843296d8c2d0d67ce20c 100644 (file)
@@ -43,6 +43,18 @@ int uclass_bind_device(struct udevice *dev);
  */
 int uclass_unbind_device(struct udevice *dev);
 
+/**
+ * uclass_pre_probe_device() - Deal with a device that is about to be probed
+ *
+ * Perform any pre-processing that is needed by the uclass before it can be
+ * probed. This includes the uclass' pre-probe() method and the parent
+ * uclass' child_pre_probe() method.
+ *
+ * @dev:       Pointer to the device
+ * #return 0 on success, -ve on error
+ */
+int uclass_pre_probe_device(struct udevice *dev);
+
 /**
  * uclass_post_probe_device() - Deal with a device that has just been probed
  *
@@ -82,4 +94,27 @@ struct uclass *uclass_find(enum uclass_id key);
  */
 int uclass_destroy(struct uclass *uc);
 
+/**
+ * uclass_find_device_by_seq() - Find uclass device based on ID and sequence
+ *
+ * This searches for a device with the given seq or req_seq.
+ *
+ * For seq, if an active device has this sequence it will be returned.
+ * If there is no such device then this will return -ENODEV.
+ *
+ * For req_seq, if a device (whether activated or not) has this req_seq
+ * value, that device will be returned. This is a strong indication that
+ * the device will receive that sequence when activated.
+ *
+ * The device is NOT probed, it is merely returned.
+ *
+ * @id: ID to look up
+ * @seq_or_req_seq: Sequence number to find (0=first)
+ * @find_req_seq: true to find req_seq, false to find seq
+ * @devp: Returns pointer to device (there is only one per for each seq)
+ * @return 0 if OK, -ve on error
+ */
+int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
+                             bool find_req_seq, struct udevice **devp);
+
 #endif