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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot