mirror-linux/include/linux/usb
Hans de Goede 7893f9e1c2 usb: typec: tcpm: Notify the tcpc to start connection-detection for SRPs
Some tcpc device-drivers need to explicitly be told to watch for connection
events, otherwise the tcpc will not generate any TCPM_CC_EVENTs and devices
being plugged into the Type-C port will not be noticed.

For dual-role ports tcpm_start_drp_toggling() is used to tell the tcpc to
watch for connection events. Sofar we lack a similar callback to the tcpc
for single-role ports. With some tcpc-s such as the fusb302 this means
no TCPM_CC_EVENTs will be generated when the port is configured as a
single-role port.

This commit renames start_drp_toggling to start_toggling and since the
device-properties are parsed by the tcpm-core, adds a port_type parameter
to the start_toggling callback so that the tcpc_dev driver knows the
port-type and can act accordingly when it starts toggling.

The new start_toggling callback now always gets called if defined, instead
of only being called for DRP ports.

To avoid this causing undesirable functional changes all existing
start_drp_toggling implementations are not only renamed to start_toggling,
but also get a port_type check added and return -EOPNOTSUPP when port_type
is not DRP.

Fixes: ea3b4d5523bc("usb: typec: fusb302: Resolve fixed power role ...")
Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19 14:23:34 +02:00
..
association.h
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h
ch9.h usb: introduce usb_ep_type_string() function 2019-03-26 16:45:03 +09:00
chipidea.h
composite.h
ehci-dbgp.h
ehci_def.h
ehci_pdriver.h
ezusb.h
functionfs.h
g_hid.h
gadget.h
gadget_configfs.h
gpio_vbus.h
hcd.h usb: core: add option of only authorizing internal devices 2019-02-22 09:27:55 +01:00
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
isp1760.h
m66592.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
otg-fsm.h
otg.h
pd.h
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h
quirks.h
r8a66597.h
renesas_usbhs.h
rndis_host.h
role.h usb: roles: Find the muxes by also matching against the device node 2019-02-14 10:52:25 +01:00
samsung_usb_phy.h
serial.h
sl811.h
storage.h
tcpm.h usb: typec: tcpm: Notify the tcpc to start connection-detection for SRPs 2019-04-19 14:23:34 +02:00
tegra_usb_phy.h
typec.h
typec_altmode.h
typec_dp.h usb: typec: displayport: Move the Configuration VDO helpers to the header 2019-02-08 10:25:12 +01:00
typec_mux.h usb: typec: Rationalize the API for the muxes 2019-02-14 10:52:25 +01:00
uas.h
ulpi.h
usb338x.h
usb_phy_generic.h
usbnet.h
wusb-wa.h
wusb.h wusb: Remove unnecessary static function ckhdid_printf 2019-03-01 20:53:41 +01:00
xhci-dbgp.h