[lkml]   [2019]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v6 6/8] 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: Jack Pham <>
Suggested-by: Rob Herring <>
Signed-off-by: John Stultz <>
Change-Id: I4a26492f19e857f3f9f29bcdab81458016f70977
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 c6316d4b7593..19504b907476 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1462,7 +1462,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: 2019-11-28 06:11    [W:0.069 / U:7.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site