mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
usb: dwc2: make otg clk optional
Fixes commit09a75e8577("usb: dwc2: refactor common low-level hw code to platform.c") The above commit consolidated the low-level phy access into a common location. This change made the otg clk a requirement and broke some platforms when it was moved into platform.c. So make clk handling optional again. Acked-by: Eric Anholt <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Cc: Marek Szyprowski <[email protected]> Acked-by: John Youn <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Fixes:09a75e8577("usb: dwc2: refactor common low-level hw code to platform.c") Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
6c2dad6916
commit
8aa90cf2a2
1 changed files with 7 additions and 4 deletions
|
|
@ -125,9 +125,11 @@ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_prepare_enable(hsotg->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (hsotg->clk) {
|
||||
ret = clk_prepare_enable(hsotg->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (hsotg->uphy)
|
||||
ret = usb_phy_init(hsotg->uphy);
|
||||
|
|
@ -175,7 +177,8 @@ static int __dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
clk_disable_unprepare(hsotg->clk);
|
||||
if (hsotg->clk)
|
||||
clk_disable_unprepare(hsotg->clk);
|
||||
|
||||
ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
|
||||
hsotg->supplies);
|
||||
|
|
|
|||
Loading…
Reference in a new issue