RE: [PATCH] usb: musb: USB Test Mode control from sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Gerald,

I have checked the debugfs. We can use it to set test mode. 
So, our Test mode control through sysfs patch is not required.

Regard,
-Praveena Nadahally

> -----Original Message-----
> From: Gerald BAEZA
> Sent: Thursday, March 31, 2011 2:06 PM
> To: balbi@xxxxxx; Praveena NADAHALLY
> Cc: linux-usb@xxxxxxxxxxxxxxx; Linus WALLEIJ
> Subject: RE: [PATCH] usb: musb: USB Test Mode control from sysfs
> 
> Hi Balbi and Praveena,
> 
> As far as I can see, what we proposed via sysfs based on 2.6.34 seems
> available in musb debugfs added by Balbi since 2.6.35.
> Reading the code, I think this should do the same.
> 
> Right ?
> 
> Best regards,
> 
> Gérald
> 
> 
> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@xxxxxx]
> Sent: Wednesday, March 30, 2011 6:41 PM
> To: Praveena NADAHALLY
> Cc: balbi@xxxxxx; linux-usb@xxxxxxxxxxxxxxx; Gerald BAEZA; Linus
> WALLEIJ
> Subject: Re: [PATCH] usb: musb: USB Test Mode control from sysfs
> 
> On Wed, Mar 30, 2011 at 06:33:43PM +0200, Praveena NADAHALLY wrote:
> > > > This patch enables USB Test Mode control
> > > > from a new "testmode" file in sysfs:
> > > >   - write "-1" to this file to get some help
> > > >   - write another value to select a test mode
> > > >   - read this file to get current TM register value
> > > >
> > > > This control can be used in USB Host or Device mode.
> > > > This will be very useful in case of host mode.
> > > >
> > > > Signed-off-by: Gérald Baëza <gerald.baeza@xxxxxxxxxxxxxx>
> > > > Signed-off-by: Praveena Nadahally
> <praveen.nadahally@xxxxxxxxxxxxxx>
> > > > Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
> > >
> > > NAK.
> > >
> > > that's supposed to be done via host side. All you need to do is
> issue a
> > > correct control message.
> >
> > The main aim of this patch is to enable
> > the "testmode" when target is in host mode.
> > Meanwhile I am checking Anand's suggestion of
> > using debugfs interfaces provided by musb.
> 
> in that case, you should use the debugfs interface.
> 
> > > > diff --git a/drivers/usb/musb/musb_virthub.c
> > > b/drivers/usb/musb/musb_virthub.c
> > > > index 489104a..583bbec 100644
> > > > --- a/drivers/usb/musb/musb_virthub.c
> > > > +++ b/drivers/usb/musb/musb_virthub.c
> > > > @@ -381,9 +381,6 @@ int musb_hub_control(
> > > >  			musb_port_suspend(musb, true);
> > > >  			break;
> > > >  		case USB_PORT_FEAT_TEST:
> > > > -			if (unlikely(is_host_active(musb)))
> > > > -				goto error;
> > > > -
> > >
> > > playing wrong!!!!
> >
> > Since I want to enable the "testmode" when target is
> > in host mode, this check was removed.
> 
> still wrong.
> 
> --
> balbi
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux