[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <hn5lcdbdmvdntmufgvzju2xsvxwplxeoechzgtxgmqkcswooxc@6zuqbfyriqnc>
Date: Mon, 27 Jan 2025 16:40:50 -0600
From: Bjorn Andersson <andersson@...nel.org>
To: Stephan Gerhold <stephan.gerhold@...aro.org>
Cc: Bjorn Andersson <bjorn.andersson@....qualcomm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Felipe Balbi <balbi@...nel.org>, Wesley Cheng <quic_wcheng@...cinc.com>,
Saravana Kannan <saravanak@...gle.com>, Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Philipp Zabel <p.zabel@...gutronix.de>, Konrad Dybcio <konradybcio@...nel.org>,
Frank Li <Frank.li@....com>, linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure
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
Powered by blists - more mailing lists