mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: Tidy up comments in uclass headers
Improve some of the comments in these files, which don't follow the correct style. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
bb36b9a7d6
commit
e86b6f7100
2 changed files with 15 additions and 16 deletions
|
@ -55,7 +55,7 @@
|
||||||
*
|
*
|
||||||
* @_name: Name of the uclass. This must be a valid C identifier, used by the
|
* @_name: Name of the uclass. This must be a valid C identifier, used by the
|
||||||
* linker_list
|
* linker_list
|
||||||
* @returns struct uclass * for the device
|
* Return: struct uclass * for the device
|
||||||
*/
|
*/
|
||||||
#define DM_UCLASS_REF(_name) \
|
#define DM_UCLASS_REF(_name) \
|
||||||
ll_entry_ref(struct uclass, _name, uclass)
|
ll_entry_ref(struct uclass, _name, uclass)
|
||||||
|
@ -120,7 +120,7 @@ int dev_get_uclass_index(struct udevice *dev, struct uclass **ucp);
|
||||||
* uclass_find_device() - Return n-th child of uclass
|
* uclass_find_device() - Return n-th child of uclass
|
||||||
* @id: Id number of the uclass
|
* @id: Id number of the uclass
|
||||||
* @index: Position of the child in uclass's list
|
* @index: Position of the child in uclass's list
|
||||||
* #devp: Returns pointer to device, or NULL on error
|
* @devp: Returns pointer to device, or NULL on error
|
||||||
*
|
*
|
||||||
* The device is not prepared for use - this is an internal function.
|
* The device is not prepared for use - this is an internal function.
|
||||||
* The function uclass_get_device_tail() can be used to probe the device.
|
* The function uclass_get_device_tail() can be used to probe the device.
|
||||||
|
@ -133,7 +133,7 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
|
||||||
/**
|
/**
|
||||||
* uclass_find_first_device() - Return the first device in a uclass
|
* uclass_find_first_device() - Return the first device in a uclass
|
||||||
* @id: Id number of the uclass
|
* @id: Id number of the uclass
|
||||||
* #devp: Returns pointer to device, or NULL on error
|
* @devp: Returns pointer to device, or NULL on error
|
||||||
*
|
*
|
||||||
* The device is not prepared for use - this is an internal function.
|
* The device is not prepared for use - this is an internal function.
|
||||||
* The function uclass_get_device_tail() can be used to probe the device.
|
* The function uclass_get_device_tail() can be used to probe the device.
|
||||||
|
@ -239,7 +239,7 @@ int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent,
|
||||||
* Connect the device into uclass's list of devices.
|
* Connect the device into uclass's list of devices.
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
int uclass_bind_device(struct udevice *dev);
|
int uclass_bind_device(struct udevice *dev);
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ int uclass_bind_device(struct udevice *dev);
|
||||||
* Call any handled needed before uclass_unbind_device() is called
|
* Call any handled needed before uclass_unbind_device() is called
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
int uclass_pre_unbind_device(struct udevice *dev);
|
int uclass_pre_unbind_device(struct udevice *dev);
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ int uclass_pre_unbind_device(struct udevice *dev);
|
||||||
* Disconnect the device from uclass's list of devices.
|
* Disconnect the device from uclass's list of devices.
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
int uclass_unbind_device(struct udevice *dev);
|
int uclass_unbind_device(struct udevice *dev);
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ static inline int uclass_unbind_device(struct udevice *dev) { return 0; }
|
||||||
* uclass' child_pre_probe() method.
|
* uclass' child_pre_probe() method.
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
int uclass_pre_probe_device(struct udevice *dev);
|
int uclass_pre_probe_device(struct udevice *dev);
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ int uclass_pre_probe_device(struct udevice *dev);
|
||||||
* uclass.
|
* uclass.
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
int uclass_post_probe_device(struct udevice *dev);
|
int uclass_post_probe_device(struct udevice *dev);
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ int uclass_post_probe_device(struct udevice *dev);
|
||||||
* Perform any pre-processing of a device that is about to be removed.
|
* Perform any pre-processing of a device that is about to be removed.
|
||||||
*
|
*
|
||||||
* @dev: Pointer to the device
|
* @dev: Pointer to the device
|
||||||
* #return 0 on success, -ve on error
|
* Return: 0 on success, -ve on error
|
||||||
*/
|
*/
|
||||||
#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
|
#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
|
||||||
int uclass_pre_remove_device(struct udevice *dev);
|
int uclass_pre_remove_device(struct udevice *dev);
|
||||||
|
|
|
@ -435,7 +435,7 @@ int uclass_probe_all(enum uclass_id id);
|
||||||
int uclass_id_count(enum uclass_id id);
|
int uclass_id_count(enum uclass_id id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uclass_id_foreach_dev() - Helper function to iteration through devices
|
* uclass_id_foreach_dev() - iterate through devices of a given uclass ID
|
||||||
*
|
*
|
||||||
* This creates a for() loop which works through the available devices in
|
* This creates a for() loop which works through the available devices in
|
||||||
* a uclass ID in order from start to end.
|
* a uclass ID in order from start to end.
|
||||||
|
@ -452,20 +452,20 @@ int uclass_id_count(enum uclass_id id);
|
||||||
list_for_each_entry(pos, &uc->dev_head, uclass_node)
|
list_for_each_entry(pos, &uc->dev_head, uclass_node)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uclass_foreach_dev() - Helper function to iteration through devices
|
* uclass_foreach_dev() - iterate through devices of a given uclass
|
||||||
*
|
*
|
||||||
* This creates a for() loop which works through the available devices in
|
* This creates a for() loop which works through the available devices in
|
||||||
* a uclass in order from start to end.
|
* a uclass in order from start to end.
|
||||||
*
|
*
|
||||||
* @pos: struct udevice * to hold the current device. Set to NULL when there
|
* @pos: struct udevice * to hold the current device. Set to NULL when there
|
||||||
* are no more devices.
|
* are no more devices.
|
||||||
* @uc: uclass to scan
|
* @uc: uclass to scan (`struct uclass *`)
|
||||||
*/
|
*/
|
||||||
#define uclass_foreach_dev(pos, uc) \
|
#define uclass_foreach_dev(pos, uc) \
|
||||||
list_for_each_entry(pos, &uc->dev_head, uclass_node)
|
list_for_each_entry(pos, &uc->dev_head, uclass_node)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uclass_foreach_dev_safe() - Helper function to safely iteration through devs
|
* uclass_foreach_dev_safe() - safely iterate through devices of a given uclass
|
||||||
*
|
*
|
||||||
* This creates a for() loop which works through the available devices in
|
* This creates a for() loop which works through the available devices in
|
||||||
* a uclass in order from start to end. Inside the loop, it is safe to remove
|
* a uclass in order from start to end. Inside the loop, it is safe to remove
|
||||||
|
@ -474,14 +474,13 @@ int uclass_id_count(enum uclass_id id);
|
||||||
* @pos: struct udevice * to hold the current device. Set to NULL when there
|
* @pos: struct udevice * to hold the current device. Set to NULL when there
|
||||||
* are no more devices.
|
* are no more devices.
|
||||||
* @next: struct udevice * to hold the next next
|
* @next: struct udevice * to hold the next next
|
||||||
* @uc: uclass to scan
|
* @uc: uclass to scan (`struct uclass *`)
|
||||||
*/
|
*/
|
||||||
#define uclass_foreach_dev_safe(pos, next, uc) \
|
#define uclass_foreach_dev_safe(pos, next, uc) \
|
||||||
list_for_each_entry_safe(pos, next, &uc->dev_head, uclass_node)
|
list_for_each_entry_safe(pos, next, &uc->dev_head, uclass_node)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uclass_foreach_dev_probe() - Helper function to iteration through devices
|
* uclass_foreach_dev_probe() - iterate through devices of a given uclass ID
|
||||||
* of given uclass
|
|
||||||
*
|
*
|
||||||
* This creates a for() loop which works through the available devices in
|
* This creates a for() loop which works through the available devices in
|
||||||
* a uclass in order from start to end. Devices are probed if necessary,
|
* a uclass in order from start to end. Devices are probed if necessary,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue