lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos SOCs
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

\
 
 \ /
  Last update: 2022-12-01 10:02    [W:0.112 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site