Re: [PATCH v2 4/6] gpio: dwapb: Use optional-clocks interface for APB ref-clock

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

 



On Mon, Mar 23, 2020 at 09:06:30PM +0300, Sergey.Semin@xxxxxxxxxxxxxxxxxxxx wrote:
> From: Serge Semin <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx>
> 
> The common clocks kernel framework provides a generic way to use
> an optional reference clock sources. If it's utilized there is no
> need in checking whether the clock descriptor pointer is actually a
> negative error at the moment of the prepare/unprepare clocks method
> calling. So if the corresponding clock source is provided, then
> getting an error shall actually terminate the device probe procedure.
> If it isn't specified then the driver shall proceed with further
> initializations.
> 
> We'll use the optional clocks getting method to handle the APB reference
> clock, which can be provided for instance in the device of-node with
> "bus" clock-name.

> -	if (!IS_ERR(gpio->clk))
> -		clk_prepare_enable(gpio->clk);
> +	clk_prepare_enable(gpio->clk);

Perhaps it makes sense now to consider error code returned by above.
Maybe it's material for a separate patch (up to you).

The rest looks good.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux