[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250115015622.xbop23ltcin6vysg@synopsys.com>
Date: Wed, 15 Jan 2025 01:56:35 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Bjorn Andersson <andersson@...nel.org>
CC: Frank Li <Frank.li@....com>,
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>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 08/12] usb: dwc3: core: Expose core driver as library
On Tue, Jan 14, 2025, Bjorn Andersson wrote:
> On Tue, Jan 14, 2025 at 02:43:59PM -0500, Frank Li wrote:
> > ...
> >
> > > +++ b/drivers/usb/dwc3/glue.h
> > > @@ -0,0 +1,22 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +/*
> > > + * glue.h - DesignWare USB3 DRD glue header
> > > + */
> > > +
> > > +#ifndef __DRIVERS_USB_DWC3_GLUE_H
> > > +#define __DRIVERS_USB_DWC3_GLUE_H
> > > +
> > > +#include <linux/types.h>
> > > +#include "core.h"
> > > +
> > > +int dwc3_init(struct dwc3 *dwc, struct resource *res);
> > > +void dwc3_uninit(struct dwc3 *dwc);
> > > +
> > > +int dwc3_runtime_suspend(struct dwc3 *dwc);
> > > +int dwc3_runtime_resume(struct dwc3 *dwc);
> > > +int dwc3_runtime_idle(struct dwc3 *dwc);
> > > +int dwc3_suspend(struct dwc3 *dwc);
> > > +int dwc3_resume(struct dwc3 *dwc);
> > > +void dwc3_complete(struct dwc3 *dwc);
> >
> > dwc3_usb_*()? There may be name polution in future. There are many IPs
> > created by dwc.
> >
>
> I thought dwc3 was uniquely associated with USB, but I don't have any
> objections to your proposal.
>
> Thanks,
> Bjorn
>
Regarding this naming, let's keep them as what Bjorn has as they are
more consistent to what we're doing in the driver. We can revise in the
future should we need to.
A couple of things I would like to rename is the "dwc3_uninit" to
perhaps use dwc3_exit or dwc3_cleanup instead; the other is the
dwc3_complete(), perhaps dwc3_pm_complete() for clarity.
Also, should we add CONFIG_PM_SLEEP guards for these exported pm ops?
Thanks,
Thinh
Powered by blists - more mailing lists