<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/dm/uclass.h, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/dm/uclass.h?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/dm/uclass.h?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-05-04T07:57:43Z</updated>
<entry>
<title>dm: core: fix introduce uclass_get_device_by_of_path</title>
<updated>2023-05-04T07:57:43Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-05-02T02:59:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f8816a8a9189250e4513d5cd15d1db657f9549a1'/>
<id>urn:sha1:f8816a8a9189250e4513d5cd15d1db657f9549a1</id>
<content type='text'>
Correct the function documentation.

Fixes: ca031c082700 ("dm: core: introduce uclass_get_device_by_of_path()")
Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: introduce uclass_get_device_by_of_path()</title>
<updated>2023-04-28T17:48:59Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2023-04-13T15:17:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ca031c082700631264d1e058f2f705438c2be8c2'/>
<id>urn:sha1:ca031c082700631264d1e058f2f705438c2be8c2</id>
<content type='text'>
There's quite a few instances of board-specific code doing

  off = fdt_path_offset(gd-&gt;fdt_blob, ...);
  ...
  ret = uclass_get_device_by_of_offset(..., off, &amp;dev);

looking for an eeprom or a pmic via some alias. Such code can be
simplified a little if we have a helper for directly getting a device
via device tree path (including being given as an alias).

Implement it in terms of ofnode rather than raw offsets so that this
will work whether live tree is enabled or not.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</content>
</entry>
<entry>
<title>dm: core: Do not stop uclass iteration on error</title>
<updated>2022-10-29T13:36:33Z</updated>
<author>
<name>Michal Suchanek</name>
<email>msuchanek@suse.de</email>
</author>
<published>2022-10-12T19:58:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f21954750aa8ed445ab83998bb099e366136c428'/>
<id>urn:sha1:f21954750aa8ed445ab83998bb099e366136c428</id>
<content type='text'>
When probing a device fails NULL pointer is returned, and following
devices in uclass list cannot be iterated. Skip to next device on error
instead.

With that the only condition under which these simple iteration
functions return error is when the dm is not initialized at uclass_get
time. This is not all that interesting, change return type to void.

Fixes: 6494d708bf ("dm: Add base driver model support")
Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: Switch uclass_*_device_err to use uclass_*_device_check</title>
<updated>2022-10-29T13:36:33Z</updated>
<author>
<name>Michal Suchanek</name>
<email>msuchanek@suse.de</email>
</author>
<published>2022-09-25T11:08:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=58ddb937e1699de241e4aa39de90a68a0be71744'/>
<id>urn:sha1:58ddb937e1699de241e4aa39de90a68a0be71744</id>
<content type='text'>
Clarify documentation, fix a few more cases that could be broken by the
change.

Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
</content>
</entry>
<entry>
<title>dm: core: Switch uclass_*_device_err to use uclass_*_device_check</title>
<updated>2022-10-18T03:17:12Z</updated>
<author>
<name>Michal Suchanek</name>
<email>msuchanek@suse.de</email>
</author>
<published>2022-10-12T19:58:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e44d7e73fe0d649693d8d0a110cd7632bc919273'/>
<id>urn:sha1:e44d7e73fe0d649693d8d0a110cd7632bc919273</id>
<content type='text'>
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.

Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: Switch uclass_foreach_dev_probe to use simple iterator</title>
<updated>2022-10-18T03:17:12Z</updated>
<author>
<name>Michal Suchanek</name>
<email>msuchanek@suse.de</email>
</author>
<published>2022-10-12T19:58:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=801f71194c54c75e90d723b9be3434b6354fce71'/>
<id>urn:sha1:801f71194c54c75e90d723b9be3434b6354fce71</id>
<content type='text'>
The return value is not used for anythig, and in a later patch the
behavior of the _err iterator will change in an incompatible way.

Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Update pvblock_probe() to avoid using internal var:
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: core: Rename and fix uclass_get_by_name_len()</title>
<updated>2022-04-25T14:00:03Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-04-25T05:30:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6aa4fe39122a85ce1ef559139518fa5042406186'/>
<id>urn:sha1:6aa4fe39122a85ce1ef559139518fa5042406186</id>
<content type='text'>
It seems that namelen is more common in U-Boot. Rename this function to
fit in better. Also fix a bug where it breaks the operation of
uclass_get_by_name() and add a test.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reported-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
</content>
</entry>
<entry>
<title>dm: core: Tidy up comments in uclass headers</title>
<updated>2022-04-06T18:03:17Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-02-28T19:08:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e86b6f71002e5892c28acd206e68d13adc76c4b7'/>
<id>urn:sha1:e86b6f71002e5892c28acd206e68d13adc76c4b7</id>
<content type='text'>
Improve some of the comments in these files, which don't follow the
correct style.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>doc: add include/dm/uclass.h to the HTML documentation</title>
<updated>2022-01-15T09:57:21Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-01-12T09:53:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=797b2a2ed4a0d34ea521e6ee07a31bdb5bd8c14a'/>
<id>urn:sha1:797b2a2ed4a0d34ea521e6ee07a31bdb5bd8c14a</id>
<content type='text'>
Correct Sphinx style comments in include/dm/uclass.h
and add the driver model UCLASS API to the HTML documentation.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>dm: core: Add a way to count the devices in a uclass</title>
<updated>2021-11-28T23:51:51Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-10-23T23:26:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=29fe555dec4c18096ab1ddd51398317160359ba1'/>
<id>urn:sha1:29fe555dec4c18096ab1ddd51398317160359ba1</id>
<content type='text'>
Add a function that returns the number of devices in a uclass. This can be
helpful in sizing an array that needs to hold a list of them.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
