Re: [PATCH] usb: musb: only draw vbus if gadget driver asks

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

 



On Wednesday 25 February 2009, Felipe Balbi wrote:
> The default limits on vbus would cause strange behaviours
> on bus-powered musb-based devices.

You actually have hardware that can run Linux from USB
suspend currents?  I thought the only such hardware used
8-bit microcontrollers.  And that Nokia's devices have
batteries, and are thus "self" powered, not bus powered.
(Self powered doesn't mean "won't use VBUS".)

Recall that such hardware must suspend at about 0.5 mA
current, though after enumeration into a "high power"
configuration (such as 500 mA) it could use 2.5 mA.


> With a 500mA configuration, the vbus draw would not switch
> from 0 to 500, it would have one step in either 8mA or 100mA
> depending whether gadget have otg enabled or not.

I don't follow.  This function is called right after a USB
reset.  No SET_CONFIGURATION has been done yet.  It's just
returning to the default state; no bug that I see.  Once
the SET_CONFIGURATION is issued, it can use more current.

- Dave


> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
> ---
> This should be ok to go on 2.6.30 merge window as it's not really
> major bug problem.
> 
>  drivers/usb/musb/musb_gadget.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
> index e7f8354..13b470e 100644
> --- a/drivers/usb/musb/musb_gadget.c
> +++ b/drivers/usb/musb/musb_gadget.c
> @@ -2024,8 +2024,4 @@ __acquires(musb->lock)
>  		musb->g.is_a_peripheral = 1;
>  	} else
>  		WARN_ON(1);
> -
> -	/* start with default limits on VBUS power draw */
> -	(void) musb_gadget_vbus_draw(&musb->g,
> -			is_otg_enabled(musb) ? 8 : 100);
>  }
> -- 
> 1.6.1.3
> 
> 



--
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