RE: [PATCH v2 01/25] usb: otg: add unified otg_notify function for usb_otg_event notification

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

 



>On Sat, Dec 11, 2010 at 12:40:44AM +0800, Hao Wu wrote:
>> This patch adds a unified otg_notify function to otg_transceiver data
>> structure. It is used for USB host/peripheral to notify otg related event
>> to otg_transceiver.
>
>Will this work for all OTG devices?  

This function will be more useful for OTG implementation which uses host driver/transceiver driver/peripheral driver architecture.
In that case, USB host/peripheral needs to notify otg events to transceiver driver (depends on OTG implementation). So made it
A unified otg_notify member of otg_transceiver data seems to be a way to share/reuse the same code in similar implementation.

This is only a interface for USB host/peripheral notification, if it is no needed for some driver, they can keep it with NULL.

>Don't they already do something like this on a per-device basis?

Not sure what's the per-device basis mentioned here. Could you provide more information? Thanks in advance.

I had checked there is a notifier in otg_transceiver, but it seems to be used for usb transceiver events notification to other driver components if I remember it correct.
It is another case for a different kind of OTG implementation. Otg_notfiy is for USB host/peripheral to notify transceiver driver.

>        /* for notification of usb_xceiv_events */
>        struct blocking_notifier_head   notifier;

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