
There is a spelling mistake and two functions are missing comments altogether. Also the flags declaration is correct, but doesn't follow style. Finally, the uclass_get_device() function has some errors in its documentation.
Fix these problems.
Signed-off-by: Simon Glass sjg@chromium.org ---
include/dm/device.h | 2 +- include/dm/lists.h | 20 ++++++++++++++++++++ include/dm/root.h | 2 +- include/dm/uclass.h | 6 ++++-- 4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/include/dm/device.h b/include/dm/device.h index 4cd38ed..b048b66 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -21,7 +21,7 @@ struct driver_info; #define DM_FLAG_ACTIVATED (1 << 0)
/* DM is responsible for allocating and freeing platdata */ -#define DM_FLAG_ALLOC_PDATA (2 << 0) +#define DM_FLAG_ALLOC_PDATA (1 << 1)
/** * struct device - An instance of a driver diff --git a/include/dm/lists.h b/include/dm/lists.h index 0d09f9a..d0b720b 100644 --- a/include/dm/lists.h +++ b/include/dm/lists.h @@ -32,8 +32,28 @@ struct driver *lists_driver_lookup_name(const char *name); */ struct uclass_driver *lists_uclass_lookup(enum uclass_id id);
+/** + * lists_bind_drivers() - search for and bind all drivers to parent + * + * This searches the U_BOOT_DEVICE() structures and creates new devices for + * each one. The devices will have @parent as their parent. + * + * @parent: parent driver (root) + * @early_only: If true, bind only drivers with the DM_INIT_F flag. If false + * bind all drivers. + */ int lists_bind_drivers(struct device *parent);
+/** + * lists_bind_fdt() - bind a device tree node + * + * This creates a new device bound to the given device tree node, with + * @parent as its parent. + * + * @parent: parent driver (root) + * @blob: device tree blob + * @offset: offset of this device tree node + */ int lists_bind_fdt(struct device *parent, const void *blob, int offset);
#endif diff --git a/include/dm/root.h b/include/dm/root.h index 069d058..1631d5d 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -41,7 +41,7 @@ int dm_scan_platdata(void); int dm_scan_fdt(const void *blob);
/** - * dm_init() - Initialize Driver Model structures + * dm_init() - Initialise Driver Model structures * * This function will initialize roots of driver tree and class tree. * This needs to be called before anything uses the DM diff --git a/include/dm/uclass.h b/include/dm/uclass.h index cd23cfe..ac5c147 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -96,12 +96,14 @@ int uclass_get(enum uclass_id key, struct uclass **ucp); /** * uclass_get_device() - Get a uclass device based on an ID and index * + * The device is probed to activate it ready for use. + * * id: ID to look up * @index: Device number within that uclass (0=first) - * @ucp: Returns pointer to uclass (there is only one per for each ID) + * devp: Returns pointer to device (there is only one per for each ID) * @return 0 if OK, -ve on error */ -int uclass_get_device(enum uclass_id id, int index, struct device **ucp); +int uclass_get_device(enum uclass_id id, int index, struct device **devp);
/** * uclass_first_device() - Get the first device in a uclass