lkml.org 
[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/6] gpio: dwapb: Use optional-clocks interface for APB ref-clock
On Mon, Mar 23, 2020 at 09:06:30PM +0300, Sergey.Semin@baikalelectronics.ru wrote:
> From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> 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


\
 
 \ /
  Last update: 2020-03-23 19:38    [W:0.147 / U:7.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site