Re: [PATCH 3/3] clk: renesas: rcar-usb2-clock-sel: Add reset_control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shimoda-san,

Thanks for your patch!

On Thu, Oct 24, 2019 at 1:17 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote:
> This hardware needs to deassert resets of both host and peripheral.
> So, this patch adds reset control.

If the hardware needs it, probably you want to make CLK_RCAR_USB2_CLOCK_SEL
select RESET_CONTROLLER?

> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>

> --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c

> @@ -164,6 +172,10 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev)
>         if (IS_ERR(priv->clks[CLK_INDEX_HS_USB]))
>                 return PTR_ERR(priv->clks[CLK_INDEX_HS_USB]);
>
> +       priv->rsts = devm_reset_control_array_get_optional_shared(&pdev->dev);

If the reset is really needed, you should not use the optional API.

> +       if (IS_ERR(priv->rsts))
> +               return PTR_ERR(priv->rsts);
> +
>         clk = devm_clk_get(dev, "usb_extal");
>         if (!IS_ERR(clk) && !clk_prepare_enable(clk)) {
>                 priv->extal = !!clk_get_rate(clk);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux