• Hans de Goede's avatar
    usb: typec: fusb302: Revert "Resolve fixed power role contract setup" · 48242e30
    Hans de Goede authored
    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. But for single-role ports we've so far been
    falling back to just calling tcpm_set_cc(). For some tcpc-s such as the
    fusb302 this is not enough and no TCPM_CC_EVENT will be generated.
    
    Commit ea3b4d55 ("usb: typec: fusb302: Resolve fixed power role
    contract setup") fixed SRPs not working because of this by making the
    fusb302 driver start connection detection on every tcpm_set_cc() call.
    It turns out this breaks src->snk power-role swapping because during the
    swap we first set the Cc pins to Rp, calling set_cc, and then send a PS_RDY
    message. But the fusb302 cannot send PD messages while its toggling engine
    is active, so sending...
    48242e30
fusb302.c 48.6 KB