]> git.sur5r.net Git - u-boot/commit
dm: core: Allow uclasses to specify platdata for a device's children
authorSimon Glass <sjg@chromium.org>
Sun, 25 Jan 2015 15:27:02 +0000 (08:27 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 30 Jan 2015 00:09:55 +0000 (17:09 -0700)
commitba8da9dc43ac8ae3351345df12dc7f9d1cd07ae0
tree9564204a9d60215eaa5fd178a9b77a42485abc59
parentcdc133bde9dd221319b9cf7fd99fcb4da8ba195c
dm: core: Allow uclasses to specify platdata for a device's children

In many cases the child platform data for a device's children is defined by
the uclass rather than the individual devices. For example, a SPI bus needs
to know the chip select and speed for each of its children. It makes sense
to allow this information to be defined the SPI uclass rather than each
individual driver.

If the device provides a size value for its child platdata, then use it.
Failng that, fall back to that provided by the uclass.

Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
include/dm/uclass.h
test/dm/bus.c