Re: [PATCH v7 2/4] i2c: tegra: calculate timeout for config load when needed

Wolfram Sang
2016-05-11T14:42:39Z

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

On Mon, Apr 25, 2016 at 07:08:37PM +0530, Shardar Shariff Md wrote:
> Instead of calculating timeout for the config load during init,
> calculate it after config load register is written by using
> readx_poll_timeout().

I don't understand this description. You replace the open coded timeout
routine with readx_poll_timeout. But I don't see any calculation moved?

> + err = readx_poll_timeout(readl, i2c_dev->base +
> + tegra_i2c_reg_addr(i2c_dev,
> + I2C_CONFIG_LOAD), val, val == 0,
> + 1000, I2C_CONFIG_LOAD_TIMEOUT);

readl_poll_timeout? And probably assign the address to a variable to
make the above code block more readable.

Thanks,

Wolfram