[U-Boot] [PATCH 0/2] dm: core: add device's uclass platform data and tests

Przemyslaw Marczak p.marczak at samsung.com
Wed Apr 8 15:01:52 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.

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

At present there is an issue with running the full dm test, but the test for
device's uclass_platdata pass.

Przemyslaw Marczak (2):
  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 ++++++++++++++++++++++----
 include/dm/device.h          | 17 +++++++++++++-
 include/dm/test.h            | 20 ++++++++++++++++
 include/dm/uclass.h          |  4 ++++
 test/dm/core.c               | 55 ++++++++++++++++++++++++++++++++++++++++++++
 test/dm/test-uclass.c        | 11 +++++++++
 7 files changed, 139 insertions(+), 5 deletions(-)

-- 
1.9.1



More information about the U-Boot mailing list