]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: Introduce per-child data for devices
authorSimon Glass <sjg@chromium.org>
Wed, 23 Jul 2014 12:55:20 +0000 (06:55 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 23 Jul 2014 13:08:37 +0000 (14:08 +0100)
commite59f458de6999b8a786da857e653db6777f675ca
tree0e57f9b83b6a484fce0543562c7c313e66b89c75
parent997c87bb0b1981fd33e34cefc26d9138f27326ce
dm: Introduce per-child data for devices

Some device types can have child devices and want to store information
about them. For example a USB flash stick attached to a USB host
controller would likely use this space. The controller can hold
information about the USB state of each of its children.

The data is stored attached to the child device in the 'parent_priv'
member. It can be auto-allocated by dm when the child is probed. To
do this, add a per_child_auto_alloc_size value to the parent driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
doc/driver-model/README.txt
drivers/core/device.c
include/dm/device.h
include/dm/test.h
test/dm/bus.c