Commit b7cf1dc3 authored by Tal Shorer's avatar Tal Shorer Committed by Felipe Balbi

usb: dwc3: ulpi: use new api

The old read, write callbacks in struct ulpi_ops have been deprecated
in favor of new callbacks that pass the parent device directly.
Replace the used callbacks in dwc3's ulpi component with the new api.
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarTal Shorer <tal.shorer@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 66914023
...@@ -35,9 +35,9 @@ static int dwc3_ulpi_busyloop(struct dwc3 *dwc) ...@@ -35,9 +35,9 @@ static int dwc3_ulpi_busyloop(struct dwc3 *dwc)
return -ETIMEDOUT; return -ETIMEDOUT;
} }
static int dwc3_ulpi_read(struct ulpi_ops *ops, u8 addr) static int dwc3_ulpi_read(struct device *dev, u8 addr)
{ {
struct dwc3 *dwc = dev_get_drvdata(ops->dev); struct dwc3 *dwc = dev_get_drvdata(dev);
u32 reg; u32 reg;
int ret; int ret;
...@@ -53,9 +53,9 @@ static int dwc3_ulpi_read(struct ulpi_ops *ops, u8 addr) ...@@ -53,9 +53,9 @@ static int dwc3_ulpi_read(struct ulpi_ops *ops, u8 addr)
return DWC3_GUSB2PHYACC_DATA(reg); return DWC3_GUSB2PHYACC_DATA(reg);
} }
static int dwc3_ulpi_write(struct ulpi_ops *ops, u8 addr, u8 val) static int dwc3_ulpi_write(struct device *dev, u8 addr, u8 val)
{ {
struct dwc3 *dwc = dev_get_drvdata(ops->dev); struct dwc3 *dwc = dev_get_drvdata(dev);
u32 reg; u32 reg;
reg = DWC3_GUSB2PHYACC_NEWREGREQ | DWC3_ULPI_ADDR(addr); reg = DWC3_GUSB2PHYACC_NEWREGREQ | DWC3_ULPI_ADDR(addr);
...@@ -66,8 +66,8 @@ static int dwc3_ulpi_write(struct ulpi_ops *ops, u8 addr, u8 val) ...@@ -66,8 +66,8 @@ static int dwc3_ulpi_write(struct ulpi_ops *ops, u8 addr, u8 val)
} }
static struct ulpi_ops dwc3_ulpi_ops = { static struct ulpi_ops dwc3_ulpi_ops = {
.read = dwc3_ulpi_read, .read_dev = dwc3_ulpi_read,
.write = dwc3_ulpi_write, .write_dev = dwc3_ulpi_write,
}; };
int dwc3_ulpi_init(struct dwc3 *dwc) int dwc3_ulpi_init(struct dwc3 *dwc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment