lkml.org 
[lkml]   [2015]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5] clk: add CS2000 Fractional-N driver
From
On Mon, Nov 9, 2015 at 2:49 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:

>> > +static int cs2000_wait_pll_lock(struct cs2000_priv *priv)
>> > +{
>> > + struct device *dev = priv_to_dev(priv);
>> > + s32 val;
>> > + unsigned int i;
>> > +
>> > + for (i = 0; i < 256; i++) {
>> > + val = cs2000_read(priv, DEVICE_CTRL);
>> > + if (val < 0)
>> > + return val;
>> > + if (!(val & PLL_UNLOCK))
>> > + return 0;
>> > + udelay(1);
>> > + }
>>
>> unsigned int i = 256;
>>
>> do {
>> val = read();
>> …
>> while ((val & PLL_UNLOCK) && --i);
>>
>> if (!i) {
>> …
>> return -EIO;
>>
>> Actually -ETIMEDOUT ?
>>
>> }
>
> What is the motivation of above ?
> It needs "i" anyway ? it needs to check (val < 0) anyway ?
> what is the difference between do {} while <-> for(xxx)

Just a style.
Still the question about error code.

>> > + of_property_read_string(np, "clock-output-names", &name);
>>
>> What about device property API?
>
> Sorry, which API ?
> Many other clk-xxx.c are using this style ?

Never mind then.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2015-11-09 10:41    [W:0.058 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site