Skip to content

Commit

Permalink
usb: otg: mv_otg: fix the clk APIs
Browse files Browse the repository at this point in the history
the clock common driver changes, and arch-mmp will make use of
the common clock driver instead of its own.
So for enable clock.
first prepare the clock
then enable the clock.

for disable clock
first disable the clock
then unprepare the clock

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Chao Xie authored and Felipe Balbi committed Dec 13, 2012
1 parent e0b64ce commit e3f1dbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/otg/mv_otg.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@ static void otg_clock_enable(struct mv_otg *mvotg)
unsigned int i;

for (i = 0; i < mvotg->clknum; i++)
clk_enable(mvotg->clk[i]);
clk_prepare_enable(mvotg->clk[i]);
}

static void otg_clock_disable(struct mv_otg *mvotg)
{
unsigned int i;

for (i = 0; i < mvotg->clknum; i++)
clk_disable(mvotg->clk[i]);
clk_disable_unprepare(mvotg->clk[i]);
}

static int mv_otg_enable_internal(struct mv_otg *mvotg)
Expand Down

0 comments on commit e3f1dbd

Please sign in to comment.