From: "Arnd Bergmann" <arnd@arndb.de>
To: "Peter Chen" <peter.chen@kernel.org>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Pawel Laszczak" <pawell@cadence.com>,
"Roger Quadros" <rogerq@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: cdns3: attempt to fix Kconfig dependencies
Date: Mon, 13 Apr 2026 18:45:38 +0200 [thread overview]
Message-ID: <51c96cbd-1d46-47ff-b553-5b81efd39067@app.fastmail.com> (raw)
In-Reply-To: <adMMm5kS3PR5CHFB@nchen-desktop>
On Mon, Apr 6, 2026, at 03:30, Peter Chen (CIX) wrote:
> On 26-04-03 20:50:52, Arnd Bergmann wrote:
>>
>> The only other alternative I see would be to split up the
>> platform driver support into separate modules for cdns3 and
>> cdnsp as well, which would make the dependencies trivial but
>> require reworking of the actual in a way that I haven't
>> been able to figure out yet. If you are already integrating
>> other changes for the next attempt, maybe you can try to
>> come up with a solution for this as well.
>
> Thanks for your suggestion, creating different platform driver
> between cdns3 and cdnsp is the way we used at downstream, but
> when I try to upstream cdsnp platform driver support, I find
> the two platforms driver are 95% identical in content, so I
> would like to keep one platform driver and one binding doc.
I gave this some more thought and realized that the best
way to handle it is probably by reworking the cdns3 driver
to no longer require the separate platform_device registration
for the child device. This would make it work like most other
drivers in the kernel, which helps both with the module
dependencies and with new developers working on it.
The way I think this can work would be:
- turn drivers/usb/cdns3/cdns3-plat.c into a library module
that exports the probe/remove/suspend/resume functions
- Remove the of_platform_populate()/platform_device_unregister()
calls from soc specific drivers
- Change the individual probe/remove callbacks to
call the exported functions from the generic driver
- Integrate cdns3_platform_data into struct cdns, and
pass that from the soc specific driver into the common
code
- Set cdns->gadget_init in the soc specific driver
There may be additional steps needed to make this work, but
the result should be much cleaner.
> By the way, are there any randconfigs I could run to avoid
> the similar break, of course, I will pass my local USB
> randconfigs tests?
Not easily, my randconfig build setup works by having a
tree with lots of fixes and workarounds for all the known
unfixed issues, so I can see regressions more quickly
and test more of the corner cases than the automated
build bots do. In most cases, the 0day bot should find
the same regressions I do, but it will take a little
longer.
Arnd
next prev parent reply other threads:[~2026-04-13 16:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 14:09 Arnd Bergmann
2026-04-02 15:21 ` Arnd Bergmann
2026-04-03 7:50 ` Peter Chen (CIX)
2026-04-03 8:39 ` Arnd Bergmann
2026-04-03 9:26 ` Peter Chen (CIX)
2026-04-03 18:50 ` Arnd Bergmann
2026-04-06 1:30 ` Peter Chen (CIX)
2026-04-13 16:45 ` Arnd Bergmann [this message]
2026-04-16 11:43 ` Peter Chen (CIX)
2026-04-16 13:19 ` Arnd Bergmann
2026-04-17 9:45 ` Peter Chen (CIX)
2026-04-03 8:54 ` Greg Kroah-Hartman
2026-04-03 9:40 ` Peter Chen (CIX)
2026-04-03 12:03 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51c96cbd-1d46-47ff-b553-5b81efd39067@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=peter.chen@kernel.org \
--cc=rogerq@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®