Skip to content

Commit

Permalink
USB: otg/ulpi.c : fix register write
Browse files Browse the repository at this point in the history
ulpi_set_vbus and ulpi_set_flags are using ULPI_SET(register) to write
to the PHY's registers, which means we can only set bits in the PHY's
register and not clear them.
By directly using the address of the register without any offset, we
now get the expected behaviour for these functions.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Eric Bénard authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 9800eb3 commit fa345d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/otg/ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static int ulpi_set_flags(struct otg_transceiver *otg)
if (otg->flags & USB_OTG_EXT_VBUS_INDICATOR)
flags |= ULPI_OTG_CTRL_EXTVBUSIND;

return otg_io_write(otg, flags, ULPI_SET(ULPI_OTG_CTRL));
return otg_io_write(otg, flags, ULPI_OTG_CTRL);
}

static int ulpi_init(struct otg_transceiver *otg)
Expand Down Expand Up @@ -95,7 +95,7 @@ static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
flags |= ULPI_OTG_CTRL_DRVVBUS_EXT;
}

return otg_io_write(otg, flags, ULPI_SET(ULPI_OTG_CTRL));
return otg_io_write(otg, flags, ULPI_OTG_CTRL);
}

struct otg_transceiver *
Expand Down

0 comments on commit fa345d0

Please sign in to comment.