Thread (9 messages) 9 messages, 3 authors, 2020-07-28

Re: [PATCH v4 3/3] usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: 2020-07-27 17:50:04
Also in: linux-devicetree, linux-usb, lkml

Hi Amelie,

On Mon, Jul 27, 2020 at 11:23 AM Amelie Delaunay [off-list ref] wrote:
[...]
quoted hunk ↗ jump to hunk
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index a3611cdd1dea..65f8596f6795 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -183,9 +183,11 @@ static void dwc2_set_stm32mp15_fsotg_params(struct dwc2_hsotg *hsotg)
 static void dwc2_set_stm32mp15_hsotg_params(struct dwc2_hsotg *hsotg)
 {
        struct dwc2_core_params *p = &hsotg->params;
+       struct device_node *np = hsotg->dev->of_node;

        p->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE;
-       p->activate_stm_id_vb_detection = true;
+       p->activate_stm_id_vb_detection =
+               !of_property_read_bool(np, "usb-role-switch");
the rest of params.c uses device_property_read_* instead of of_read_property_*
I thought I'd mention it so you can decide yourself whether this is
fine or needs to be changed


Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help