Date:2013-12-17 12:14:39 (10 months 14 days ago)
Author:Lars C.
Commit:af3548b2d53c17288a16d4c1e2f9bad1f65e122e
Message:usb: musb-jz4740: Remove set_vbus callback

The jz4740 is gadget mode only, so there is no vbus signal to control. Set musb
core handles the case where no callback is supplied just fine.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Files: drivers/usb/musb/jz4740.c (2 diffs)

Change Details

drivers/usb/musb/jz4740.c
2828    struct clk *clk;
2929};
3030
31static void jz4740_musb_set_vbus(struct musb *musb, int is_on)
32{
33    u8 devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
34
35    /* HDRC controls CPEN, but beware current surges during device
36     * connect. They can trigger transient overcurrent conditions
37     * that must be ignored.
38     */
39
40    if (is_on) {
41        musb->is_active = 1;
42        musb->xceiv->otg->default_a = 1;
43        musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
44        devctl |= MUSB_DEVCTL_SESSION;
45
46        MUSB_HST_MODE(musb);
47    } else {
48        musb->is_active = 0;
49
50        /* NOTE: we're skipping A_WAIT_VFALL -> A_IDLE and
51         * jumping right to B_IDLE...
52         */
53
54        musb->xceiv->otg->default_a = 0;
55        musb->xceiv->state = OTG_STATE_B_IDLE;
56        devctl &= ~MUSB_DEVCTL_SESSION;
57
58        MUSB_DEV_MODE(musb);
59    }
60    musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
61
62    dev_dbg(musb->xceiv->dev, "VBUS %s, devctl %02x "
63        /* otg %3x conf %08x prcm %08x */ "\n",
64        usb_otg_state_string(musb->xceiv->state),
65        musb_readb(musb->mregs, MUSB_DEVCTL));
66}
67
6831static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci)
6932{
7033    unsigned long flags;
...... 
142105static const struct musb_platform_ops jz4740_musb_ops = {
143106    .init = jz4740_musb_init,
144107    .exit = jz4740_musb_exit,
145
146    .set_vbus = jz4740_musb_set_vbus,
147108};
148109
149110static int jz4740_probe(struct platform_device *pdev)

Archive Download the corresponding diff file



interactive