Commit 746c9085 authored by Chanwoo Choi's avatar Chanwoo Choi Committed by Felipe Balbi

usb: phy: tahvo: Replace the deprecated extcon API

This patch replaces the deprecated extcon API as following:
- extcon_set_cable_state_() -> extcon_set_state_sync()
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent c773bb0b
...@@ -121,7 +121,7 @@ static void check_vbus_state(struct tahvo_usb *tu) ...@@ -121,7 +121,7 @@ static void check_vbus_state(struct tahvo_usb *tu)
prev_state = tu->vbus_state; prev_state = tu->vbus_state;
tu->vbus_state = reg & TAHVO_STAT_VBUS; tu->vbus_state = reg & TAHVO_STAT_VBUS;
if (prev_state != tu->vbus_state) { if (prev_state != tu->vbus_state) {
extcon_set_cable_state_(tu->extcon, EXTCON_USB, tu->vbus_state); extcon_set_state_sync(tu->extcon, EXTCON_USB, tu->vbus_state);
sysfs_notify(&tu->pt_dev->dev.kobj, NULL, "vbus_state"); sysfs_notify(&tu->pt_dev->dev.kobj, NULL, "vbus_state");
} }
} }
...@@ -130,7 +130,7 @@ static void tahvo_usb_become_host(struct tahvo_usb *tu) ...@@ -130,7 +130,7 @@ static void tahvo_usb_become_host(struct tahvo_usb *tu)
{ {
struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent); struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
extcon_set_cable_state_(tu->extcon, EXTCON_USB_HOST, true); extcon_set_state_sync(tu->extcon, EXTCON_USB_HOST, true);
/* Power up the transceiver in USB host mode */ /* Power up the transceiver in USB host mode */
retu_write(rdev, TAHVO_REG_USBR, USBR_REGOUT | USBR_NSUSPEND | retu_write(rdev, TAHVO_REG_USBR, USBR_REGOUT | USBR_NSUSPEND |
...@@ -149,7 +149,7 @@ static void tahvo_usb_become_peripheral(struct tahvo_usb *tu) ...@@ -149,7 +149,7 @@ static void tahvo_usb_become_peripheral(struct tahvo_usb *tu)
{ {
struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent); struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
extcon_set_cable_state_(tu->extcon, EXTCON_USB_HOST, false); extcon_set_state_sync(tu->extcon, EXTCON_USB_HOST, false);
/* Power up transceiver and set it in USB peripheral mode */ /* Power up transceiver and set it in USB peripheral mode */
retu_write(rdev, TAHVO_REG_USBR, USBR_SLAVE_CONTROL | USBR_REGOUT | retu_write(rdev, TAHVO_REG_USBR, USBR_SLAVE_CONTROL | USBR_REGOUT |
...@@ -379,9 +379,9 @@ static int tahvo_usb_probe(struct platform_device *pdev) ...@@ -379,9 +379,9 @@ static int tahvo_usb_probe(struct platform_device *pdev)
} }
/* Set the initial cable state. */ /* Set the initial cable state. */
extcon_set_cable_state_(tu->extcon, EXTCON_USB_HOST, extcon_set_state_sync(tu->extcon, EXTCON_USB_HOST,
tu->tahvo_mode == TAHVO_MODE_HOST); tu->tahvo_mode == TAHVO_MODE_HOST);
extcon_set_cable_state_(tu->extcon, EXTCON_USB, tu->vbus_state); extcon_set_state_sync(tu->extcon, EXTCON_USB, tu->vbus_state);
/* Create OTG interface */ /* Create OTG interface */
tahvo_usb_power_off(tu); tahvo_usb_power_off(tu);
......
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