dm: core: Allow parents to have platform data for their children
authorSimon Glass <sjg@chromium.org>
Sun, 25 Jan 2015 15:27:01 +0000 (08:27 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 30 Jan 2015 00:09:54 +0000 (17:09 -0700)
commitcdc133bde9dd221319b9cf7fd99fcb4da8ba195c
treedaef0d65d0107aa4b93d3611f217947a6cf502e8
parentf8a85449ef3e0963add728815771ccc09aa99875
dm: core: Allow parents to have platform data for their children

For buses it is common for parents to need to know the address of the child
on the bus, the bus speed to use for that child, and other information. This
can be provided in platform data attached to each child.

Add driver model support for this, including auto-allocation which can be
requested using a new property to specify the size of the data.

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