On Wed, Jun 20, 2012 at 01:12:34PM +0200, Lukasz Majewski wrote: > Hi Sergei, > > > Hello. > > > > On 20-06-2012 11:14, Lukasz Majewski wrote: > > > > > This commit adds pullup method implementation for UDC s3c-hsotg > > > driver. It is needed for e.g. CCG - Configurable Composite Gadget, > > > when user space configuration change request device disconnection > > > from USB bus (done via calling usb_gadget_connect/disconnect, which > > > calls UDC's pullup method). > > > > > Implementation of pullup method has caused removal of phy_enable and > > > core_init methods from udc_start to pullup. > > > > > Signed-off-by: Lukasz Majewski<l.majewski@xxxxxxxxxxx> > > > Signed-off-by: Kyungmin Park<kyungmin.park@xxxxxxxxxxx> > > > --- > > > drivers/usb/gadget/s3c-hsotg.c | 33 > > > ++++++++++++++++++++++++++++++--- 1 files changed, 30 > > > insertions(+), 3 deletions(-) > > > > > diff --git a/drivers/usb/gadget/s3c-hsotg.c > > > b/drivers/usb/gadget/s3c-hsotg.c index d208c46..c37f98b 100644 > > > --- a/drivers/usb/gadget/s3c-hsotg.c > > > +++ b/drivers/usb/gadget/s3c-hsotg.c > > [...] > > > @@ -3028,10 +3025,40 @@ static int s3c_hsotg_gadget_getframe(struct > > > usb_gadget *gadget) return s3c_hsotg_read_frameno(to_hsotg(gadget)); > > > } > > > > > > +/** > > > + * s3c_hsotg_pullup - connect/disconnect the USB PHY > > > + * @gadget: The usb gadget state > > > + * @is_on: Current state of the USB PHY > > > + * > > > + * Connect/Disconnect the USB PHY pullup > > > + */ > > > +static int s3c_hsotg_pullup(struct usb_gadget *gadget, int is_on) > > > +{ > > > + struct s3c_hsotg *hsotg = to_hsotg(gadget); > > > + unsigned long flags = 0; > > > + > > > + dev_info(hsotg->dev, "%s: is_in: %d\n", __func__, is_on); > > > > Not dev_dbg()? > > The matter of taste. I personally feel more self-confident, when I can > read what udc-core and pullup in particular is doing (especially when > considering the patch about gadget.h refcounting support and problems > with CCG gadget). That's fine, but do you want every single user in the world of this code to be also reading this? Please make it dev_dbg(), that way you can turn it on if you need to, but it doesn't clutter up the logs of everyone else who doesn't. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html