mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-16 15:02:16 +01:00
dm: Provide a way to shut down driver model
Add a new method which removes and unbinds all drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
7497812d47
commit
9adbd7a116
@ -56,6 +56,14 @@ int dm_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dm_uninit(void)
|
||||||
|
{
|
||||||
|
device_remove(dm_root());
|
||||||
|
device_unbind(dm_root());
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int dm_scan_platdata(void)
|
int dm_scan_platdata(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@ -50,4 +50,12 @@ int dm_scan_fdt(const void *blob);
|
|||||||
*/
|
*/
|
||||||
int dm_init(void);
|
int dm_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dm_uninit - Uninitialise Driver Model structures
|
||||||
|
*
|
||||||
|
* All devices will be removed and unbound
|
||||||
|
* @return 0 if OK, -ve on error
|
||||||
|
*/
|
||||||
|
int dm_uninit(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user