RE: [PATCH v7 2/2] i2c: aspeed: support ast2600 i2c new register mode driver

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

 



Hello Andi,

> -----Original Message-----
> From: Andi Shyti <andi.shyti@xxxxxxxxxx>
> Sent: Tuesday, March 28, 2023 9:12 PM
> To: Ryan Chen <ryan_chen@xxxxxxxxxxxxxx>
> Cc: jk@xxxxxxxxxxxxxxxxxxxx; openbmc@xxxxxxxxxxxxxxxx;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-i2c@xxxxxxxxxxxxxxx; Rob Herring
> <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@xxxxxxxxxx>; Joel Stanley <joel@xxxxxxxxx>; Andrew
> Jeffery <andrew@xxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>;
> linux-aspeed@xxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v7 2/2] i2c: aspeed: support ast2600 i2c new register mode
> driver
> 
> Hi Ryan,
> 
> [...]
> 
> > +	ret = of_property_read_u32(dev->of_node,
> > +							"i2c-scl-clk-low-timeout-us",
> > +							&i2c_bus->timeout);
> 
> in your v6 patch this was a boolean value. If you need to keep it boolean you
> have the "i2c-scl-has-clk-low-timeout".

Thank your remind, I will keep " i2c-scl-clk-low-timeout-us", if property is empty, will disable it.
If not, will enable the timeout. It is ok for me.

> 
> > +	if (ret < 0) {
> > +		i2c_bus->timeout = 0;
> > +	} else {
> > +		/* i2c timeout counter: use base clk4 1Mhz
> > +		 * per unit: 1/(1000/4096) = 4096us
> > +		 */
> > +		i2c_bus->timeout /= 4096;
> > +	}
> 
> Can you please run checkpatch.pl before sending the patch?
> 
> [...]
> 
> > +	dev_info(dev, "%s [%d]: adapter [%d khz] mode [%d]\n",
> > +		 dev->of_node->name, i2c_bus->adap.nr, i2c_bus->bus_frequency /
> 1000,
> > +		 i2c_bus->mode);
> > +
> > +	return 0;
> > +
> > +	return ret;
> 
> can you also please do some cleanups before sending the patch?
Sorry, will update these two. And send next patch.

Best Regards,
Ryan.




[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