[U-Boot] [PATCH v3 3/4] core: Add dev_{disable,enable}_by_path

Simon Glass sjg at chromium.org
Tue Oct 2 11:20:40 UTC 2018


On 26 June 2018 at 16:18, Simon Glass <sjg at chromium.org> wrote:
> On 26 June 2018 at 00:46, Mario Six <mario.six at 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 at 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 at chromium.org>

Applied to u-boot-dm, and now in mainline, thanks!


More information about the U-Boot mailing list