Re: [PATCH v2 4/9] i2c: rcar: switch to i2c generic dt parsing

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

 



On Tue, 2015-12-08 at 12:59 +0200, Andy Shevchenko wrote:
> On Tue, 2015-12-08 at 10:37 +0100, Wolfram Sang wrote:
> > From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> > 
> > Switch to the new generic functions. Plain convert, no
> > functionality
> > added yet.
> 
> One style nitpick.

Ah, just seen next patch. Yeah, current make sense.
Never mind below comment.

> 
> > 
> > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/i2c/busses/i2c-rcar.c | 16 +++++++++-------
> >  1 file changed, 9 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-rcar.c
> > b/drivers/i2c/busses/i2c-
> > rcar.c
> > index d4322a9096786f..c663f4389bf898 100644
> > --- a/drivers/i2c/busses/i2c-rcar.c
> > +++ b/drivers/i2c/busses/i2c-rcar.c
> > @@ -162,12 +162,15 @@ static int rcar_i2c_bus_barrier(struct
> > rcar_i2c_priv *priv)
> >  	return -EBUSY;
> >  }
> >  
> > -static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
> > u32
> > bus_speed)
> > +static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
> > struct i2c_timings *t)
> >  {
> >  	u32 scgd, cdf, round, ick, scl, cdf_width;
> >  	unsigned long rate;
> >  	struct device *dev = rcar_i2c_priv_to_dev(priv);
> >  
> > +	/* Fall back to previously used values if not supplied */
> > +	t->bus_freq_hz = t->bus_freq_hz ?: 100000;
> 
> On one hand it seems enough space to put one more t->bus_freq_hz, on
> the other why not
> 
> if (!t->bus_freq_hz)
>   = 100000;
> 
> I think a bit better to maintain latter.
> 

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
��.n��������+%������w��{.n�����{��-��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux