Skip to content
Snippets Groups Projects
Commit 5eaed880 authored by Przemyslaw Marczak's avatar Przemyslaw Marczak Committed by Simon Glass
Browse files

dm: core: Extend struct udevice by '.uclass_platdata' field.


This commit adds 'uclass_platdata' field to 'struct udevice', which
can be automatically allocated at bind. The allocation size is defined
in 'struct uclass_driver' as 'per_device_platdata_auto_alloc_size'.

New device's flag is added: DM_FLAG_ALLOC_UCLASS_PDATA, which is used
for memory freeing at device unbind method.

As for other udevice's fields, a complementary function is added:
- dev_get_uclass_platdata()

Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent c1d6f919
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment