aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-ti.c
diff options
context:
space:
mode:
authorHans de Goede <[email protected]>2019-04-16 22:07:52 +0200
committerGreg Kroah-Hartman <[email protected]>2019-04-19 14:23:34 +0200
commit7893f9e1c26d1f9ea02622902ee671de45ad377b (patch)
tree1189909c0f33b9d8eae5812316f550e3b24aacb6 /drivers/usb/cdns3/cdns3-ti.c
parent9bcb762ce02db5cc99e6705f0fcfab6b097a9bc8 (diff)
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 <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Tested-by: Adam Thomson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions