diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2020-09-07 17:46:33 +0300 |
---|---|---|
committer | Eugen Hristev <eugen.hristev@microchip.com> | 2020-09-22 11:27:18 +0300 |
commit | cfecbaf4e768991056a88d3a7a3daf4b4baf8038 (patch) | |
tree | 5f3b366650bcddfce7ee3462417a6de3669ca57b /include/dm | |
parent | b04da9fcf78e233e70ea5ace757c0b8b95bb2459 (diff) | |
download | u-boot-cfecbaf4e768991056a88d3a7a3daf4b4baf8038.zip u-boot-cfecbaf4e768991056a88d3a7a3daf4b4baf8038.tar.gz u-boot-cfecbaf4e768991056a88d3a7a3daf4b4baf8038.tar.bz2 |
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>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/device-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index 5145fb4..1dcc22f 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -84,6 +84,15 @@ 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 * * Read platform data for a device (typically from the device tree) so that |