[U-Boot] [PATCH V2 0/3] dm: core: add device's uclass platform data and tests
Przemyslaw Marczak
p.marczak at samsung.com
Wed Apr 8 17:32:26 CEST 2015
The struct udevice provides two fields for device's platform data:
- .platdata - to keep platform-dependent data for the device driver
- .parent_platdata - to keep platform-dependent data for the device parent
Some implementations may need addidional platform data, which could be owned
by the uclass. For example, the regulator device's constraints.
This patchset adds the additional field:
- .uclass_platdata - to keep platform-dependend data for the uclass driver
Two tests are added to the test framework:
- one for check dev->uclass_platdata pointer
- second for validation the data assigned to by test uclass's post_bind() method
Change in V2:
- implementation of functions for getting the uclass's device without probe it
- cleanup test code
Przemyslaw Marczak (3):
dm: core: add internal functions for getting the device without probe
dm: core: Extend struct udevice by '.uclass_platdata' field.
dm: test: Add tests for device's uclass platform data
drivers/core/device-remove.c | 4 +++
drivers/core/device.c | 33 ++++++++++++++++++++++---
drivers/core/uclass.c | 59 +++++++++++++++++++++++++-------------------
include/dm/device.h | 17 ++++++++++++-
include/dm/test.h | 20 +++++++++++++++
include/dm/uclass-internal.h | 22 +++++++++++++++++
include/dm/uclass.h | 4 +++
test/dm/core.c | 55 +++++++++++++++++++++++++++++++++++++++++
test/dm/test-uclass.c | 11 +++++++++
9 files changed, 195 insertions(+), 30 deletions(-)
--
1.9.1
More information about the U-Boot
mailing list