
2 Oct
2018
2 Oct
'18
1:20 p.m.
On 26 June 2018 at 16:18, Simon Glass sjg@chromium.org wrote:
On 26 June 2018 at 00:46, Mario Six mario.six@gdsys.cc wrote:
We cannot use device structures to disable devices, since getting them with the API functions would bind and activate the device, which would fail if the underlying device does not exist.
Hence, add a function to disable devices by path in a live device tree.
Signed-off-by: Mario Six mario.six@gdsys.cc
v2 -> v3:
- Renamed res to ret
- Introduced device_find_by_ofnode() function
- Fixed error handling in some places
v1 -> v2:
- Simplified np_to_ofnode(of_find_node_by_path(path)) to ofnode_path(path)
- Switched to returning -ENOSYS if livetree is not enabled
drivers/core/device.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/dm/device.h | 16 +++++++++++ 2 files changed, 94 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, and now in mainline, thanks!