[lkml]   [2020]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RESEND][PATCH v8 6/6] usb: dwc3: Rework resets initialization to be more flexible
The dwc3 core binding specifies one reset.

However some variants of the hardware may have more. Previously
this was handled by using the dwc3-of-simple glue driver, but
that resulted in a proliferation of bindings for for every
variant, when the only difference was the clocks and resets

So this patch reworks the reading of the resets to fetch all the
resets specified in the dts together.

This patch was recommended by Rob Herring <>
as an alternative to creating multiple bindings for each variant
of hardware.

Cc: Greg Kroah-Hartman <>
Cc: Rob Herring <>
Cc: Mark Rutland <>
CC: ShuFan Lee <>
Cc: Heikki Krogerus <>
Cc: Suzuki K Poulose <>
Cc: Chunfeng Yun <>
Cc: Yu Chen <>
Cc: Felipe Balbi <>
Cc: Hans de Goede <>
Cc: Andy Shevchenko <>
Cc: Jun Li <>
Cc: Valentin Schneider <>
Cc: Guillaume Gardet <>
Cc: Jack Pham <>
Suggested-by: Rob Herring <>
Signed-off-by: John Stultz <>
v3: Rework dwc3 core rather then adding another dwc-of-simple
v6: Re-introduce this patch, on Rob's suggestion
drivers/usb/dwc3/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index ba21af5c1204..2afcc04da338 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1465,7 +1465,7 @@ static int dwc3_probe(struct platform_device *pdev)


- dwc->reset = devm_reset_control_get_optional_shared(dev, NULL);
+ dwc->reset = devm_reset_control_array_get(dev, true, true);
if (IS_ERR(dwc->reset))
return PTR_ERR(dwc->reset);

 \ /
  Last update: 2020-03-11 18:21    [W:0.060 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site