RE: [PATCH 2/2] usb: otg: introduce otg_notify_event and otg_get_last_event

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

 



 

>-----Original Message-----
>From: linux-usb-owner@xxxxxxxxxxxxxxx 
>[mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Balbi, Felipe
>Sent: Wednesday, October 06, 2010 6:35 PM
>To: David Brownell
>Cc: Balbi, Felipe; dbrownell@xxxxxxxxxxxxxxxxxxxxx; Arnaud 
>Mandy; felipe.balbi@xxxxxx; linux-usb@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH 2/2] usb: otg: introduce otg_notify_event 
>and otg_get_last_event
>
>On Wed, Oct 06, 2010 at 05:29:33AM -0500, David Brownell wrote:
>>
>>> what happens, then, if e.g. device has usb charging and
>>> devicde starts
>>> to boot when you connect usb cable. Then, by the time link
>>> (in this case
>>> musb) probes it will have lost the VBUS notification from phy.
>>
>>That should be trivial:  enter the B-mode OTG
>>stage machine and set the relevant flags, as well
>>as updating the OTG state.  Remember it doesn't
>>care about the notification, just the OTG state.
>>
>>The transceiver/phy driver can do that.
>>
>> Link needs to know about that somehow.
>>
>>It can see that the otg_transceiver's default_a
>>flag is clear.  Probably doesn't want to switch
>>on all the default-b states, for simplicity.
>
>We want to keep link powered down until we get a) VBUS IRQ or b) ID pin
>IRQ. There's no point turning it on before that since USB cable isn't
>connected anyway. If you say checking xceiv->state is enough, then it's
>enough :-p
>
How about enabling these OTG interrupts(VBUS and ID) only when the user
calls like xceiv->otg_init function in the driver probe.
In the otg_init function call the irq handlers which will
catch the status and send the events? 
With this we can avoid the unnecessary interrupts when the user modules are not loaded.

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