]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: tag: add some document
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 15 Apr 2022 07:15:36 +0000 (16:15 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 23 Apr 2022 20:05:34 +0000 (22:05 +0200)
Some basic stuff about tag support is explained under
doc/devlop/driver-model.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
doc/develop/driver-model/design.rst

index b0e6337030a186c04380054204218a123f2c2951..5f33f9fbb3275fb29e5da5221ccec4b95e454ba2 100644 (file)
@@ -1042,6 +1042,27 @@ data structure might be worthwhile in some rare cases, once we understand
 what the bottlenecks are.
 
 
+Tag Support
+-----------
+
+It is sometimes useful for a subsystem to associate its own private
+data (or object) to a DM device, i.e. struct udevice, to support
+additional features.
+
+Tag support in driver model will give us the ability to do so dynamically
+instead of modifying "udevice" data structure. In the initial release, we
+will support two type of attributes:
+
+- a pointer with dm_tag_set_ptr(), and
+- an unsigned long with dm_tag_set_val()
+
+For example, UEFI subsystem utilizes the feature to maintain efi_disk
+objects depending on linked udevice's lifecycle.
+
+While the current implementation is quite simple, it will get evolved
+as the feature is more extensively used in U-Boot subsystems.
+
+
 Changes since v1
 ----------------