Loading drivers/usb/pd/policy_engine.c +9 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #include <linux/completion.h> Loading Loading @@ -539,6 +539,7 @@ static inline void start_usb_host(struct usbpd *pd, bool ss) { enum plug_orientation cc = usbpd_get_plug_orientation(pd); union extcon_property_value val; int ret = 0; val.intval = (cc == ORIENTATION_CC2); extcon_set_property(pd->extcon, EXTCON_USB_HOST, Loading @@ -549,6 +550,13 @@ static inline void start_usb_host(struct usbpd *pd, bool ss) EXTCON_PROP_USB_SS, val); extcon_set_state_sync(pd->extcon, EXTCON_USB_HOST, 1); /* blocks until USB host is completely started */ ret = extcon_blocking_sync(pd->extcon, EXTCON_USB_HOST, 1); if (ret) { usbpd_err(&pd->dev, "err(%d) starting host", ret); return; } } static inline void stop_usb_peripheral(struct usbpd *pd) Loading Loading
drivers/usb/pd/policy_engine.c +9 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #include <linux/completion.h> Loading Loading @@ -539,6 +539,7 @@ static inline void start_usb_host(struct usbpd *pd, bool ss) { enum plug_orientation cc = usbpd_get_plug_orientation(pd); union extcon_property_value val; int ret = 0; val.intval = (cc == ORIENTATION_CC2); extcon_set_property(pd->extcon, EXTCON_USB_HOST, Loading @@ -549,6 +550,13 @@ static inline void start_usb_host(struct usbpd *pd, bool ss) EXTCON_PROP_USB_SS, val); extcon_set_state_sync(pd->extcon, EXTCON_USB_HOST, 1); /* blocks until USB host is completely started */ ret = extcon_blocking_sync(pd->extcon, EXTCON_USB_HOST, 1); if (ret) { usbpd_err(&pd->dev, "err(%d) starting host", ret); return; } } static inline void stop_usb_peripheral(struct usbpd *pd) Loading