On Mon, Jan 27, 2025 at 06:57:41PM +0100, Stephan Gerhold wrote: > On Mon, Jan 13, 2025 at 09:11:33PM -0800, Bjorn Andersson wrote: [..] > > 118 files changed, 8389 insertions(+), 670 deletions(-) > > --- > > This is quite a lot of code and new files for a temporary migration. > It's also difficult to test these changes fully, since there are > separate overlays for each SoC and sometimes even each board. > > Would it be easier to just duplicate the dwc3-qcom driver for now? > Making a copy of the current dwc3-qcom.c would be just 1000 lines of > extra code, compared to more than 7000 for the overlay approach. > > The copy (e.g. dwc3-qcom-legacy.c) would keep handling the old bindings > with the existing code (that is known to work to some extent). We can > then improve upon the main version without risk of breaking any old > DTBs. If we decide to drop support for the old DTBs at some point, we > can just drop dwc3-qcom-legacy. > > This approach is also not pretty, but I think the risk and effort would > be lower than making sure the overlay approach works on all the affected > targets. > I like this suggestion. It's much more isolated and we know the current state of the driver works with the current dtbs out there - so backwards compatibility would be handled. I also did end up having to use separate compatibles for the old and new binding/driver, so this should be quite clean - i.e. nicer than the overlay-based path... The one drawback would be that devices that isn't updated to a new dtb would not gain the upcoming improved support for role switching, or any of the improvements in pm_runtime-support (as I assume we'd only care about the new driver). But I think that's worth the saving in complexity. Regards, Bjorn