Re: [PATCH 2/2] usb: musb: notify USB_EVENT_ENUMERATED from musb_gadget_vbus_draw()

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

 



Hi,

On Wed, Sep 22, 2010 at 03:55:14AM -0500, Maulik Mankad wrote:
How about adding two notifiers as below?

(1) The existing "otg" notifier that notifies about the VBUS presence
/ absence can be used to kick start charger type detection.
    Since TWL interrupts happens in thread context this can remain as
a blocking notifier.

it's ok to call atomic_notifier() from a threaded_irq afaict.

(2) Another "current change" notifier that MUSB driver uses to notify
the current that battery driver can draw under various bus states like
USB_STATE_NOTATTACHED (0 mA), USB_STATE_SUSPENDED (< 2.5mA),
USB_STATE_DEFAULT (100 mA) and USB_STATE_CONFIGURED (<500 mA) which
needs to be an atomic notifier.

I think one notifier is enough, otherwise charger drivers will have to
listen to two notifiers.

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