Hi,
On 2019/2/19 10:57, Jun Li wrote:
>>
>> +static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
>> +{
>> + u32 mode;
>> +
>> + switch (role) {
>> + case USB_ROLE_HOST:
>> + mode = DWC3_GCTL_PRTCAP_HOST;
>> + break;
>> + c
Hi
Yu Chen 于2019年2月18日周一 下午7:34写道:
>
> The Type-C drivers use USB role switch API to inform the
> system about the negotiated data role, so registering a role
> switch in the DRD code in order to support platforms with
> USB Type-C connectors.
>
> Cc: John Stultz
> Cc: Felipe Balbi
> Cc: Greg Kr
Hi,
On 2019/2/19 1:30, Valentin Schneider wrote:
> Hi,
>
> On 18/02/2019 11:23, Yu Chen wrote:
> [...]
>> @@ -522,6 +556,15 @@ int dwc3_drd_init(struct dwc3 *dwc)
>> dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG);
>> }
>>
>> +dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
>> +
Hi,
On 18/02/2019 11:23, Yu Chen wrote:
[...]
> @@ -522,6 +556,15 @@ int dwc3_drd_init(struct dwc3 *dwc)
> dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG);
> }
>
> + dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
> + dwc3_role_switch.set = dwc3_usb_role_switch_set;
> +
The Type-C drivers use USB role switch API to inform the
system about the negotiated data role, so registering a role
switch in the DRD code in order to support platforms with
USB Type-C connectors.
Cc: John Stultz
Cc: Felipe Balbi
Cc: Greg Kroah-Hartman
Cc: Heikki Krogerus
Suggested-by: Heikk