Hector Martin: "Not happy with the pile-of-hacks approach, but it…" - Treehouse Mastodon

submited by
Style Pass
2025-01-26 07:30:03
Not happy with the pile-of-hacks approach, but it does seem to mostly work for now. I've concluded at this point that I'm going to fork tipd, since if we're putting critical hotplug sequencing behavior in there, I don't want to be coordinating with the non-Apple users of that driver (which use different, related chips anyway, and seem to be in use on vastly simpler platforms with no alt mode support at all). I'll just split it into common helpers and separate top-level drivers for cd321x and tps6598x. Besides, we need an entire new spmi backend for M3+ anyway. Putting debouncing/event coalescing and asynchronous queuing into tipd, and getting rid of the dwc3 workqueue stuff in turn, seems to have fixed most of the hotplug horribleness. I also had to make one single subsystem change, adding a data_role member to the TypeC mux config structure. That's arguably useful for "real" muxes anyway since you could hypothetically have to mux between a USB host controller and a USB device controller anyway (instead of them being combined). It's only implemented in tipd and atcphy, all other existing drivers ignore it. Hope upstream doesn't push back on this. Still really not happy with how interdependent dwc3, tipd, and atcphy have become, but this is the only realistic way to move forward in the short term. https://social.treehouse.systems/@marcan/113839521099032865
Leave a Comment