lkml.org 
[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC/PATCH 2/5] usb: otg: twl4030: add support for notifier
    Date
    it's expected that the transceiver driver will
    initialize and call the notifier chain when
    necessary. Implement that for twl4030-usb driver.

    Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
    ---
    drivers/usb/otg/twl4030-usb.c | 7 +++++--
    1 files changed, 5 insertions(+), 2 deletions(-)

    diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
    index 2ffc8eb..c3e498a 100644
    --- a/drivers/usb/otg/twl4030-usb.c
    +++ b/drivers/usb/otg/twl4030-usb.c
    @@ -36,7 +36,7 @@
    #include <linux/i2c/twl4030.h>
    #include <linux/regulator/consumer.h>
    #include <linux/err.h>
    -
    +#include <linux/notifier.h>

    /* Register defines */

    @@ -628,7 +628,8 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
    else
    twl4030_phy_resume(twl);

    - twl4030charger_usb_en(status == USB_LINK_VBUS);
    + blocking_notifier_call_chain(&twl->otg.notifier, status,
    + twl->otg.gadget);
    }
    sysfs_notify(&twl->dev->kobj, NULL, "vbus");

    @@ -718,6 +719,8 @@ 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);
    +
    /* Our job is to use irqs and status from the power module
    * to keep the transceiver disabled when nothing's connected.
    *
    --
    1.6.6.rc0


    \
     
     \ /
      Last update: 2009-12-11 12:35    [W:0.025 / U:3.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site