[U-Boot] [PATCH V4 00/10] dm: core: extend API by useful functions with tests
Przemyslaw Marczak
p.marczak at samsung.com
Wed Apr 15 13:07:16 CEST 2015
Hello,
Before merge, I would like to extend this patchset by additional functions [V4],
which are now the base for my work on PMIC.
The base version:
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
Change in V3:
- add tests for uclass device get/find functions
Change in V4:
- remove type 'static' for uclass_get_device_tail()
- add: class_get/find_device_by_name() with sandbox tests
- add: dev_get_driver_ops()
- add: dev_get_uclass_name()
Przemyslaw Marczak (10):
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
dm: test: Add tests for get/find uclass devices
dm: core: remove type 'static' of function uclass_get_device_tail()
dm: core: uclass: add function: uclass_find_device_by_name()
dm: core: uclass: add function: uclass_get_device_by_name()
dm: core: device: add function: dev_get_driver_ops()
dm: core: device: add function: dev_get_uclass_name()
dm: test: Add tests for get/find uclass's device by name
drivers/core/device-remove.c | 4 +
drivers/core/device.c | 49 ++++++++++++-
drivers/core/uclass.c | 96 +++++++++++++++++-------
include/dm/device.h | 38 +++++++++-
include/dm/test.h | 20 +++++
include/dm/uclass-internal.h | 100 +++++++++++++++++++------
include/dm/uclass.h | 19 +++++
test/dm/core.c | 170 ++++++++++++++++++++++++++++++++++++++++++-
test/dm/test-uclass.c | 11 +++
9 files changed, 451 insertions(+), 56 deletions(-)
--
1.9.1
More information about the U-Boot
mailing list