[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221205021143.GB54922@ubuntu>
Date: Mon, 5 Dec 2022 11:11:43 +0900
From: Jung Daehwan <dh10.jung@...sung.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Linus Walleij <linus.walleij@...aro.org>,
Colin Ian King <colin.i.king@...il.com>,
Artur Bujdoso <artur.bujdoso@...il.com>,
Juergen Gross <jgross@...e.com>,
Tomer Maimon <tmaimon77@...il.com>,
"open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES"
<linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES"
<linux-samsung-soc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>, sc.suh@...sung.com,
taehyun.cho@...sung.com, jh0801.jung@...sung.com,
eomji.oh@...sung.com
Subject: Re: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos
SOCs
On Thu, Dec 01, 2022 at 10:01:44AM +0100, Arnd Bergmann wrote:
> On Thu, Dec 1, 2022, at 09:06, Greg Kroah-Hartman wrote:
> > On Thu, Dec 01, 2022 at 11:13:31AM +0900, Daehwan Jung wrote:
> >> This driver works with xhci platform driver. It needs to override
> >> functions of xhci_plat_hc_driver. Wakelocks are used for sleep/wakeup
> >> scenario of system.
> >
> > So this means that no other platform xhci driver can be supported in the
> > same system at the same time.
> >
> > Which kind of makes sense as that's not anything a normal system would
> > have, BUT it feels very odd. This whole idea of "override the platform
> > driver" feels fragile, why not make these just real platform drivers and
> > have the xhci platform code be a library that the other ones can use?
> > That way you have more control overall, right?
>
> Agreed, having another layer here (hcd -> xhci -> xhcd_platform ->
> xhcd_exynos) would fit perfectly well into how other SoC specific
> drivers are abstracted. This could potentially also help reduce
> the amount of code duplication between other soc specific variants
> (mtk, tegra, mvebu, ...) that are all platform drivers but don't
> share code with xhci-plat.c.
>
> Alternatively, it seems that all of the xhci-exynos support could
> just be part of the generic xhci-platform driver: as far as I can
> tell, none of the added code is exynos specific at all, instead it
> is a generic xhci that is using the wakeup_source framework.
>
> It should be possible to check at runtime whether an xhci-platform
> instance uses the wakeup source or not, and then have the same
> driver work across more platforms.
>
> Arnd
>
Currently there's no other platforms using wakelock. I wanted to add
xhci-exynos as I think Exynos use it specially. I also agree we can add it
on xhci platform driver if needed.
Best Regards,
Jung Daehwan
Powered by blists - more mailing lists