[patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
most of our notifications, will be called from IRQ context, so an atomic notifier suits the job better. Signed-off-by: Felipe Balbi --- drivers/usb/otg/ab8500-usb.c|6 +++--- drivers/usb/otg/nop-usb-xceiv.c |2 +- drivers/usb/otg/twl4030-usb.c |6 +++--- drivers/usb/otg/twl6030-usb.c |8 include/linux/usb/otg.h |6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index d14736b..07ccea9 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c @@ -212,7 +212,7 @@ static int ab8500_usb_link_status_update(struct ab8500_usb *ab) break; } - blocking_notifier_call_chain(&ab->otg.notifier, event, v); + atomic_notifier_call_chain(&ab->otg.notifier, event, v); return 0; } @@ -281,7 +281,7 @@ static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA) ab->vbus_draw = mA; if (mA) - blocking_notifier_call_chain(&ab->otg.notifier, + atomic_notifier_call_chain(&ab->otg.notifier, USB_EVENT_ENUMERATED, ab->otg.gadget); return 0; } @@ -500,7 +500,7 @@ static int __devinit ab8500_usb_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ab); - BLOCKING_INIT_NOTIFIER_HEAD(&ab->otg.notifier); + ATOMIC_INIT_NOTIFIER_HEAD(&ab->otg.notifier); /* v1: Wait for link status to become stable. * all: Updates form set_host and set_peripheral as they are atomic. diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index 8acf165..c1e3600 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c @@ -132,7 +132,7 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev) platform_set_drvdata(pdev, nop); - BLOCKING_INIT_NOTIFIER_HEAD(&nop->otg.notifier); + ATOMIC_INIT_NOTIFIER_HEAD(&nop->otg.notifier); return 0; exit: diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 6ca505f..2362d83 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -512,7 +512,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) else twl4030_phy_resume(twl); - blocking_notifier_call_chain(&twl->otg.notifier, status, + atomic_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); } sysfs_notify(&twl->dev->kobj, NULL, "vbus"); @@ -534,7 +534,7 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl) twl->asleep = 0; } - blocking_notifier_call_chain(&twl->otg.notifier, status, + atomic_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); } sysfs_notify(&twl->dev->kobj, NULL, "vbus"); @@ -623,7 +623,7 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev) if (device_create_file(&pdev->dev, &dev_attr_vbus)) dev_warn(&pdev->dev, "could not create sysfs file\n"); - BLOCKING_INIT_NOTIFIER_HEAD(&twl->otg.notifier); + ATOMIC_INIT_NOTIFIER_HEAD(&twl->otg.notifier); /* Our job is to use irqs and status from the power module * to keep the transceiver disabled when nothing's connected. diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index 05f17b7..8a91b4b 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c @@ -263,13 +263,13 @@ static irqreturn_t twl6030_usb_irq(int irq, void *_twl) twl->otg.state = OTG_STATE_B_IDLE; twl->linkstat = status; twl->otg.last_event = status; - blocking_notifier_call_chain(&twl->otg.notifier, + atomic_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); } else { status = USB_EVENT_NONE; twl->linkstat = status; twl->otg.last_event = status; - blocking_notifier_call_chain(&twl->otg.notifier, + atomic_notifier_call_chain(&twl->otg.notifier, status, twl->otg.gadget); if (twl->asleep) { regulator_disable(twl->usb3v3); @@ -302,7 +302,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) twl->otg.state = OTG_STATE_A_IDLE; twl->linkstat = status; twl->otg.last_event = status; - blocking_notifier_call_chain(&twl->otg.notifier, status, + atomic_notifier_call_chain(&twl->otg.no
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
Hi Felipe, On Thu, Feb 17, 2011 at 02:38:49PM +0200, ext Felipe Balbi wrote: > most of our notifications, will be called from IRQ > context, so an atomic notifier suits the job better. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/otg/ab8500-usb.c|6 +++--- > drivers/usb/otg/nop-usb-xceiv.c |2 +- > drivers/usb/otg/twl4030-usb.c |6 +++--- > drivers/usb/otg/twl6030-usb.c |8 > include/linux/usb/otg.h |6 +++--- > 5 files changed, 14 insertions(+), 14 deletions(-) You should fix drivers/usb/otg/ab8500-usb.c as well. Also, drivers/power/twl4030_charger.c will need to be made atomic notifier safe. -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
On Fri, Feb 25, 2011 at 12:46:53PM +0200, ext Heikki Krogerus wrote: > Hi Felipe, > > On Thu, Feb 17, 2011 at 02:38:49PM +0200, ext Felipe Balbi wrote: > > most of our notifications, will be called from IRQ > > context, so an atomic notifier suits the job better. > > > > Signed-off-by: Felipe Balbi > > --- > > drivers/usb/otg/ab8500-usb.c|6 +++--- > > drivers/usb/otg/nop-usb-xceiv.c |2 +- > > drivers/usb/otg/twl4030-usb.c |6 +++--- > > drivers/usb/otg/twl6030-usb.c |8 > > include/linux/usb/otg.h |6 +++--- > > 5 files changed, 14 insertions(+), 14 deletions(-) > > You should fix drivers/usb/otg/ab8500-usb.c as well. Sorry, ignore that :). > drivers/power/twl4030_charger.c will need to be made atomic notifier > safe. Still valid I belive. -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
On Fri, Feb 25, 2011 at 12:50:13PM +0200, Heikki Krogerus wrote: > On Fri, Feb 25, 2011 at 12:46:53PM +0200, ext Heikki Krogerus wrote: > > Hi Felipe, > > > > On Thu, Feb 17, 2011 at 02:38:49PM +0200, ext Felipe Balbi wrote: > > > most of our notifications, will be called from IRQ > > > context, so an atomic notifier suits the job better. > > > > > > Signed-off-by: Felipe Balbi > > > --- > > > drivers/usb/otg/ab8500-usb.c|6 +++--- > > > drivers/usb/otg/nop-usb-xceiv.c |2 +- > > > drivers/usb/otg/twl4030-usb.c |6 +++--- > > > drivers/usb/otg/twl6030-usb.c |8 > > > include/linux/usb/otg.h |6 +++--- > > > 5 files changed, 14 insertions(+), 14 deletions(-) > > > > You should fix drivers/usb/otg/ab8500-usb.c as well. > > Sorry, ignore that :). > > > drivers/power/twl4030_charger.c will need to be made atomic notifier > > safe. > > Still valid I belive. oops, that thing is doing i2c transfers. Would you care to send a patch since you have that hardware easily available ?? -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
On Fri, Feb 25, 2011 at 12:53:17PM +0200, ext Felipe Balbi wrote: > > > drivers/power/twl4030_charger.c will need to be made atomic notifier > > > safe. > > oops, that thing is doing i2c transfers. Would you care to send a patch > since you have that hardware easily available ?? I can make a patch for this if you like, but I don't have the hw. -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
On Fri, Feb 25, 2011 at 01:07:41PM +0200, Heikki Krogerus wrote: > On Fri, Feb 25, 2011 at 12:53:17PM +0200, ext Felipe Balbi wrote: > > > > drivers/power/twl4030_charger.c will need to be made atomic notifier > > > > safe. > > > > oops, that thing is doing i2c transfers. Would you care to send a patch > > since you have that hardware easily available ?? > > I can make a patch for this if you like, but I don't have the hw. Aha, I got confused with the isp1710, sorry. If you can cook a patch please do and Cc Grazvydas Ignotas when you send it ;-) -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch-v2.6.39 12/12] usb: otg: notifier: switch to atomic notifier
On Fri, Feb 25, 2011 at 01:24:00PM +0200, ext Felipe Balbi wrote: > On Fri, Feb 25, 2011 at 01:07:41PM +0200, Heikki Krogerus wrote: > > On Fri, Feb 25, 2011 at 12:53:17PM +0200, ext Felipe Balbi wrote: > > > > > drivers/power/twl4030_charger.c will need to be made atomic notifier > > > > > safe. > > > > > > oops, that thing is doing i2c transfers. Would you care to send a patch > > > since you have that hardware easily available ?? > > > > I can make a patch for this if you like, but I don't have the hw. > > Aha, I got confused with the isp1710, sorry. If you can cook a patch > please do and Cc Grazvydas Ignotas when you send it > ;-) OK, np. -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html