Home
last modified time | relevance | path

Searched hist:d1cab63e6650d7f09b6eaa3f4e2609d5daa058bd (Results 1 – 2 of 2) sorted by relevance

/rk3399_rockchip-uboot/include/dm/
H A Duclass.hd1cab63e6650d7f09b6eaa3f4e2609d5daa058bd Wed Oct 12 19:58:06 UTC 2022 Michal Suchanek <msuchanek@suse.de> UPSTREAM: dm: core: Switch uclass_*_device_err to use uclass_*_device_check

The _err variant iterators use the simple iterators without suffix as
basis.

However, there is no user that uclass_next_device_err for iteration,
many users of uclass_first_device_err use it to get the first and
(assumed) only device of an uclass, and a couple that use
uclass_next_device_err to get the device following a known device in the
uclass list.

While there are some truly singleton device classes in which more than
one device cannot exist these are quite rare, and most classes can have
multiple devices even if it is not the case on the SoC's EVB.

In a later patch the simple iterators will be updated to not stop on
error and return next device instead. With this in many cases the code
that expects the first device or an error if it fails to probe may get
the next device instead. Use the _check iterators as the basis of _err
iterators to preserve the old behavior.

Change-Id: Ia4a249c906a12db0cda69d44097a4fd3682d2ed9
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit e44d7e73fe0d649693d8d0a110cd7632bc919273)
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
/rk3399_rockchip-uboot/drivers/core/
H A Duclass.cd1cab63e6650d7f09b6eaa3f4e2609d5daa058bd Wed Oct 12 19:58:06 UTC 2022 Michal Suchanek <msuchanek@suse.de> UPSTREAM: dm: core: Switch uclass_*_device_err to use uclass_*_device_check

The _err variant iterators use the simple iterators without suffix as
basis.

However, there is no user that uclass_next_device_err for iteration,
many users of uclass_first_device_err use it to get the first and
(assumed) only device of an uclass, and a couple that use
uclass_next_device_err to get the device following a known device in the
uclass list.

While there are some truly singleton device classes in which more than
one device cannot exist these are quite rare, and most classes can have
multiple devices even if it is not the case on the SoC's EVB.

In a later patch the simple iterators will be updated to not stop on
error and return next device instead. With this in many cases the code
that expects the first device or an error if it fails to probe may get
the next device instead. Use the _check iterators as the basis of _err
iterators to preserve the old behavior.

Change-Id: Ia4a249c906a12db0cda69d44097a4fd3682d2ed9
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit e44d7e73fe0d649693d8d0a110cd7632bc919273)
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>