Hello Jonas,

On Mon, Jun 03, 2024 at 11:58:07AM +0200, Jonas Karlman wrote:
> Some initial quick feedback is that the tcpm uclass and driver should
> probably take more advantage of the u-boot driver model.
> 
> Few quick thoughts:
> - Split out uclass/driver api parts into tcpm-uclass.c
> - Take advantage of uclass_driver ops such as post_probe and
>   per_device_auto/per_device_plat_auto to e.g. handle tcpm_port_init and
>   tcpm_port/tcpm_dev
> - udevice should probably be passed to tcpm_ functions instead of a
>   tcpm_port, dev_get_uclass_plat/priv could possible be used to get
>   the tcpm_port data for the udevice
> 
> I have not yet had time to runtime test this but will do and get back
> with a more in depth review later this week.

Thanks for the quick thoughts. They do sound very sensible, so I
gave them a go. The diff turned out to be quite big (about 20% of
all lines changed). It's currently one big cleanup commit, which I
still need to split and merge into the tcpm and fusb302 commits.
After doing that and some more testing on my side I will send
PATCHv2. I expect this to happen within the next 48h, so it might be
sensible to wait with further testing / review until that happened.

Greetings,

-- Sebastian

Attachment: signature.asc
Description: PGP signature

Reply via email to