Commit 24a5d34d authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Greg Kroah-Hartman
Browse files

usb: gadget: omap_udc: Make it CCF clk API compatible



The driver, OMAP1 specific, now omits clk_prepare/unprepare() steps, not
supported by OMAP1 custom implementation of clock API.  However, non-CCF
stubs of those functions exist for use on such platforms until converted
to CCF.

Update the driver to be compatible with CCF implementation of clock API.

Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Link: https://lore.kernel.org/r/20220402112658.130191-1-jmkrzyszt@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0fee30ab
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2606,6 +2606,8 @@ static void omap_udc_release(struct device *dev)
	if (udc->dc_clk) {
		if (udc->clk_requested)
			omap_udc_enable_clock(0);
		clk_unprepare(udc->hhc_clk);
		clk_unprepare(udc->dc_clk);
		clk_put(udc->hhc_clk);
		clk_put(udc->dc_clk);
	}
@@ -2770,8 +2772,8 @@ static int omap_udc_probe(struct platform_device *pdev)
		hhc_clk = clk_get(&pdev->dev, "usb_hhc_ck");
		BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk));
		/* can't use omap_udc_enable_clock yet */
		clk_enable(dc_clk);
		clk_enable(hhc_clk);
		clk_prepare_enable(dc_clk);
		clk_prepare_enable(hhc_clk);
		udelay(100);
	}

@@ -2780,8 +2782,8 @@ static int omap_udc_probe(struct platform_device *pdev)
		hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck");
		BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk));
		/* can't use omap_udc_enable_clock yet */
		clk_enable(dc_clk);
		clk_enable(hhc_clk);
		clk_prepare_enable(dc_clk);
		clk_prepare_enable(hhc_clk);
		udelay(100);
	}

@@ -2929,8 +2931,8 @@ static int omap_udc_probe(struct platform_device *pdev)
		usb_put_phy(xceiv);

	if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
		clk_disable(hhc_clk);
		clk_disable(dc_clk);
		clk_disable_unprepare(hhc_clk);
		clk_disable_unprepare(dc_clk);
		clk_put(hhc_clk);
		clk_put(dc_clk);
	}