]> git.baikalelectronics.ru Git - kernel.git/commit
USB: OTG: Use work_queue in set_vbus for TWL6030 transciever
authorMoiz Sonasath <m-sonasath@ti.com>
Mon, 27 Jun 2011 15:01:01 +0000 (10:01 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Jul 2011 21:45:43 +0000 (14:45 -0700)
commitf8a18d4abbe4d48aae6ac7b5b4bc7fb4cd83755b
treee53b4a3129ea59396f513a647b2e0d7e7358f82c
parentaad82d107f188f8b6e642e7fa8112642fc30df50
USB: OTG: Use work_queue in set_vbus for TWL6030 transciever

With this commit: aae1f6054d599aa99f2e8bce41086d978f34a9de
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: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/otg/twl6030-usb.c