[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TY1PR01MB1769EA2ACCC9EC9D0F2DC00EF55C0@TY1PR01MB1769.jpnprd01.prod.outlook.com>
Date: Tue, 17 Jul 2018 13:12:05 +0000
From: Phil Edworthy <phil.edworthy@...esas.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Simon Horman <horms@...ge.net.au>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Linux I2C <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: RE: [PATCH 2/2] i2c: designware: Add support for a bus clock
Hi Geert,
On 17 July 2018 14:02, Geert Uytterhoeven wrote:
> On Tue, Jul 17, 2018 at 2:42 PM Phil Edworthy wrote:
> > On 17 July 2018 13:24, Andy Shevchenko wrote:
> > > On Tue, 2018-07-17 at 14:07 +0200, Simon Horman wrote:
> > > > On Mon, Jul 16, 2018 at 09:59:13AM +0100, Phil Edworthy wrote:
> > > > > The Synopsys I2C Controller has a bus clock, but typically SoCs
> > > > > hide this away.
> > > > > However, on some SoCs you need to explicity enable the bus clock
> > > > > in order to access the registers.
> > > > > Therefore, enable an optional bus clock specified by DT.
> > >
> > > > > + /* Optional bus clock */
> > > > > + if (!IS_ERR(dev->busclk)) {
> > > >
> > > > I suspect that error values stored in dev->busclk, other than
> > > > -ENOENT, should be treated as errors.
> > IS_ERR catches all errors and is the correct way to check the value
> > returned by devm_clk_get.
>
> What if it returns -EPROBE_DEFER, which means the clock is referenced, and
> thus not optional, but not yet ready?
> For optional clocks, all errors but -ENOENT should be propagated up.
Good point!
Thanks
Phil
Powered by blists - more mailing lists