Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Andrew Lunn
> The clk API outside of DT doesn't have knowledge of when it's "complete" > to be able to determine whether the clock is not present or temporarily > missing. I've already NAK'd this suggestion. Hi Russell O.K, yes, makes sense. We do have of_clk_get_by_name() and of_clk_get(). Would optional

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Russell King - ARM Linux
On Sat, Nov 04, 2017 at 08:37:31PM +0100, Andrew Lunn wrote: > Hi Florian > > > > >> + /* Clock is optional on most platforms */ > > > >> + priv->clk = devm_clk_get(dev, NULL); > > > >> + if (IS_ERR(priv->clk)) > > > >> + priv->clk = NULL; > > > > > > > > at least in c

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Andrew Lunn
Hi Florian > > >> +/* Clock is optional on most platforms */ > > >> +priv->clk = devm_clk_get(dev, NULL); > > >> +if (IS_ERR(priv->clk)) > > >> +priv->clk = NULL; > > > > > > at least in case of EPROBE_DEFERED this isn't the expected behavior. > > > Maybe

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Stefan Wahren
> Florian Fainelli hat am 4. November 2017 um 18:59 > geschrieben: > > > Hi Stefan, > > On 11/04/2017 06:50 AM, Stefan Wahren wrote: > > Hi Florian, > > > >> Florian Fainelli hat am 2. November 2017 um 02:04 > >> geschrieben: > >> > >> > >> One of the last steps before bcm63xx-rng can be e

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Florian Fainelli
Hi Stefan, On 11/04/2017 06:50 AM, Stefan Wahren wrote: > Hi Florian, > >> Florian Fainelli hat am 2. November 2017 um 02:04 >> geschrieben: >> >> >> One of the last steps before bcm63xx-rng can be eliminated is to manage >> a clock during hwrng::init and hwrng::cleanup, so fetch it in the prob

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Stefan Wahren
Hi Florian, > Florian Fainelli hat am 2. November 2017 um 02:04 > geschrieben: > > > One of the last steps before bcm63xx-rng can be eliminated is to manage > a clock during hwrng::init and hwrng::cleanup, so fetch it in the probe > function, and manage it during these two steps when valid. >

[PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-01 Thread Florian Fainelli
One of the last steps before bcm63xx-rng can be eliminated is to manage a clock during hwrng::init and hwrng::cleanup, so fetch it in the probe function, and manage it during these two steps when valid. Signed-off-by: Florian Fainelli --- drivers/char/hw_random/bcm2835-rng.c | 14 ++