usb: dwc3-msm: Set usb_data_enabled initial value earlier

Test: Boot with USB plugged in and have working USB data connection.
Change-Id: I009226d859cc73de08ab7ac7db576b3cb0a0986c
This commit is contained in:
Michael Bestas 2022-03-15 21:15:06 +02:00
commit 7bb14160ec
No known key found for this signature in database
GPG key ID: CC95044519BE6669

View file

@ -5030,6 +5030,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)
mdwc->ss_redriver_node = of_parse_phandle(node, "ssusb_redriver", 0);
/* set the initial value */
mdwc->usb_data_enabled = true;
if (of_property_read_bool(node, "usb-role-switch")) {
role_desc.fwnode = dev_fwnode(&pdev->dev);
mdwc->role_switch = usb_role_switch_register(mdwc->dev,
@ -5112,8 +5115,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
dwc3_ext_event_notify(mdwc);
}
/* set the initial value */
mdwc->usb_data_enabled = true;
device_create_file(&pdev->dev, &dev_attr_orientation);
device_create_file(&pdev->dev, &dev_attr_mode);
device_create_file(&pdev->dev, &dev_attr_speed);