• Moiz Sonasath's avatar
    USB: OTG: Use work_queue in set_vbus for TWL6030 transciever · 5bf54506
    Moiz Sonasath authored
    With this commit: cccad6d4
    usb: otg: notifier: switch to atomic notifier
    
    Following dumps are observed on attach/detach for MUSB HOST
    mode and on a detach for MUSB Device mode.
    
    BUG: sleeping function called from invalid context at kernel/mutex.c:85
    where, the source is:
    twl6030_usb_irq
    ->atomic_notifier_call_chain
     ->musb_otg_notifications
      ->twl6030_set_vbus
       ->twl_i2c_write_u8
        ->mutex_lock
    
    This patch moves the i2c writes in set_vbus function to a
    work-queue thereby avoiding I2C writes in atomic context.
    
    Tested HOST and Device mode functionality on OMAP4460
    Signed-off-by: default avatarMoiz Sonasath <m-sonasath@ti.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    5bf54506
twl6030-usb.c 13.5 KB