Commit 02026de8 authored by Chanwoo Choi's avatar Chanwoo Choi

phy: phy-bcm-ns2-usbdrd: Replace the deprecated extcon API

This patch replaces the deprecated extcon API as following:
- extcon_set_cable_state_() -> extcon_get_state()
Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 86f44c88
...@@ -253,16 +253,16 @@ static void extcon_work(struct work_struct *work) ...@@ -253,16 +253,16 @@ static void extcon_work(struct work_struct *work)
vbus = gpiod_get_value_cansleep(driver->vbus_gpiod); vbus = gpiod_get_value_cansleep(driver->vbus_gpiod);
if (!id && vbus) { /* Host connected */ if (!id && vbus) { /* Host connected */
extcon_set_cable_state_(driver->edev, EXTCON_USB_HOST, true); extcon_set_state_sync(driver->edev, EXTCON_USB_HOST, true);
pr_debug("Host cable connected\n"); pr_debug("Host cable connected\n");
driver->data->new_state = EVT_HOST; driver->data->new_state = EVT_HOST;
connect_change(driver); connect_change(driver);
} else if (id && !vbus) { /* Disconnected */ } else if (id && !vbus) { /* Disconnected */
extcon_set_cable_state_(driver->edev, EXTCON_USB_HOST, false); extcon_set_state_sync(driver->edev, EXTCON_USB_HOST, false);
extcon_set_cable_state_(driver->edev, EXTCON_USB, false); extcon_set_state_sync(driver->edev, EXTCON_USB, false);
pr_debug("Cable disconnected\n"); pr_debug("Cable disconnected\n");
} else if (id && vbus) { /* Device connected */ } else if (id && vbus) { /* Device connected */
extcon_set_cable_state_(driver->edev, EXTCON_USB, true); extcon_set_state_sync(driver->edev, EXTCON_USB, true);
pr_debug("Device cable connected\n"); pr_debug("Device cable connected\n");
driver->data->new_state = EVT_DEVICE; driver->data->new_state = EVT_DEVICE;
connect_change(driver); connect_change(driver);
......
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