All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jung Daehwan <dh10.jung@samsung.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Felipe Balbi <balbi@kernel.org>,
	"open list:USB SUBSYSTEM" <linux-usb@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	sc.suh@samsung.com, taehyun.cho@samsung.com,
	jh0801.jung@samsung.com, eomji.oh@samsung.com
Subject: Re: [RFC PATCH v2 1/3] usb: support Samsung Exynos xHCI Controller
Date: Mon, 2 Jan 2023 15:35:36 +0900	[thread overview]
Message-ID: <20230102063536.GD74470@ubuntu> (raw)
In-Reply-To: <4c779562-37d2-4bd3-bb02-41b943d7ef9d@app.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]

On Thu, Dec 29, 2022 at 03:44:02PM +0100, Arnd Bergmann wrote:
> On Thu, Dec 29, 2022, at 10:57, Daehwan Jung wrote:
> > Currently, dwc3 invokes just xhci platform driver without any data.
> > We add xhci node as child of dwc3 node in order to get data from
> > device tree. It populates "xhci" child by name during initialization
> > of host. This patch only effects if dwc3 node has a child named "xhci"
> > not to disturb original path.
> 
> Using child nodes is not the normal way of abstracting a soc specific
> variant of a device, though there are some USB host drivers that
> do this. Just use the node itself and add whatever samsung specific
> properties are needed based on the compatible string.
> 

I've tried to use existing platform drivers(dwc3, xhci-plat).
Dwc3 has host mode and I think it's necessary to have child node.
Currently we can't use compatible string but can just use xhci platform driver
itself. That's why I modified to have a xhci child. It makes us to use
specific properties.

I don't find a better way even if it's not the normal way.
I'm going to talk with other maintainers(dwc3, xhci-plat) to solve the
problem.

> > @@ -86,6 +90,33 @@ static void xhci_plat_quirks(struct device *dev, 
> > struct xhci_hcd *xhci)
> >  	xhci->quirks |= XHCI_PLAT | priv->quirks;
> >  }
> > 
> > +static int xhci_plat_bus_suspend(struct usb_hcd *hcd)
> > +{
> > +	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
> > +
> > +	if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) {
> > +		if (hcd == xhci->main_hcd)
> > +			__pm_relax(xhci->main_wakelock);
> > +		else
> > +			__pm_relax(xhci->shared_wakelock);
> > +	}
> > +
> > +	return xhci_bus_suspend(hcd);
> > +}
> > +
> > +static int xhci_plat_bus_resume(struct usb_hcd *hcd)
> > +{
> > +	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
> > +
> > +	if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) {
> > +		if (hcd == xhci->main_hcd)
> > +			__pm_stay_awake(xhci->main_wakelock);
> > +		else
> > +			__pm_stay_awake(xhci->shared_wakelock);
> > +	}
> > +	return xhci_bus_resume(hcd);
> > +}
> 
> It looks like these are no longer tied to the Samsung
> device type, which would be a step in the right direction,
> but I think adding this should be a separate patch since
> it is not a hardware specific change but a new feature.
> 
>     Arnd
> 

Thanks for the comment. I will separate and fix commit msg on next
submission.

Best Regards,
Jung Deahwan

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2023-01-02  6:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20221229100409epcas2p123de28f73dfb4d7429d0e15e41bb13a7@epcas2p1.samsung.com>
2022-12-29  9:57 ` [RFC PATCH v2 0/3] support Samsung Exynos xHCI Controller Daehwan Jung
2022-12-29  9:57   ` [RFC PATCH v2 1/3] usb: " Daehwan Jung
2022-12-29 10:25     ` Krzysztof Kozlowski
2023-01-02  6:24       ` Jung Daehwan
2023-01-02  8:30         ` Krzysztof Kozlowski
2022-12-29 14:35     ` kernel test robot
2022-12-29 14:44     ` Arnd Bergmann
2023-01-02  6:35       ` Jung Daehwan [this message]
2022-12-29 15:16     ` kernel test robot
2022-12-29  9:57   ` [RFC PATCH v2 2/3] dt-bindings: usb: generic-xhci: add Samsung Exynos compatible Daehwan Jung
2022-12-29 10:19     ` Krzysztof Kozlowski
2023-01-02  5:30       ` Jung Daehwan
2023-01-02  8:27         ` Krzysztof Kozlowski
2022-12-29  9:57   ` [RFC PATCH v2 3/3] dt-bindings: usb: snps,dwc3: add generic-xhci as child Daehwan Jung
2022-12-29 10:23     ` Krzysztof Kozlowski
2023-01-02  5:45       ` Jung Daehwan
2023-01-03 18:52         ` Rob Herring
2022-12-30 16:34     ` Rob Herring

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=20230102063536.GD74470@ubuntu \
    --to=dh10.jung@samsung.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eomji.oh@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jh0801.jung@samsung.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=sc.suh@samsung.com \
    --cc=taehyun.cho@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.