[RFC 1/7] dm: add get_dp_node() to struct uclass_driver
Simon Glass
sjg at chromium.org
Mon Mar 27 21:03:20 CEST 2023
Hi Heinrich,
On Mon, 27 Mar 2023 at 22:41, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> On 3/27/23 10:24, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Mon, 27 Mar 2023 at 19:48, Heinrich Schuchardt
> > <heinrich.schuchardt at canonical.com> wrote:
> >>
> >>
> >>
> >> On 3/27/23 06:00, Simon Glass wrote:
> >>> Hi Heinrich,
> >>>
> >>> On Mon, 27 Mar 2023 at 06:27, Heinrich Schuchardt
> >>> <heinrich.schuchardt at canonical.com> wrote:
> >>>>
> >>>> Currently the device paths don't match the dm tree.
> >>>> We should create a device path node per dm tree node.
> >>>>
> >>>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> >>>> ---
> >>>> include/dm/uclass.h | 5 +++++
> >>>> 1 file changed, 5 insertions(+)
> >>>
> >>> This affects very few uclasses but adds a field to all of them. I
> >>> think an event might be best for this. We can add an event spy in each
> >>> of the affected uclasses.
> >>
> >> EVENT_SPY does not allow to return information to the emitter of the event.
> >
> > You just add it into unio event_data
>
> If you have multiple listeners for a single event, you can't be sure who
> added what.
It is possible for a spy to claim an event and put its info in it.
>
> >
> >>
> >> event_notfify() does not allow to select a single recipient.
> >
> > Do you need that? You can check whether the uclass matches, for example.
>
> Checking the uclass multiple times is not efficient.
>
> We are talking about 1 KiB for the pointers vs repetitive coding. We
> should go for the simplest code and most efficient code.
Firstly, this should be done in an API so that the actual
implementation can be adjusted in future. Let's continue the
discussion on the other patch.
>
> If you want to save memory, (temporarily) remove unused methods in
> struct uclass_driver: pre_unbind, post_bind, post_remove.
That is a separate issue from adding more. I would like to do that,
but it would be easy enough for someone else to take this on, given
that the tag support is in there now.
[..]
Regards,
Simon
More information about the U-Boot
mailing list