mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: add support for device re-parenting
In common clock framework the relation b/w parent and child clocks is determined based on the udevice parent/child information. A clock parent could be changed based on devices needs. In case this is happen the functionalities for clock who's parent is changed are broken. Add a function that reparent a device. This will be used in clk-uclass.c to reparent a clock device. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b04da9fcf7
commit
cfecbaf4e7
3 changed files with 191 additions and 0 deletions
|
@ -83,6 +83,15 @@ int device_bind_with_driver_data(struct udevice *parent,
|
|||
int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
|
||||
struct driver_info *info, struct udevice **devp);
|
||||
|
||||
/**
|
||||
* device_reparent: reparent the device to a new parent
|
||||
*
|
||||
* @dev: pointer to device to be reparented
|
||||
* @new_parent: pointer to new parent device
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int device_reparent(struct udevice *dev, struct udevice *new_parent);
|
||||
|
||||
/**
|
||||
* device_ofdata_to_platdata() - Read platform data for a device
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue