lkml.org 
[lkml]   [2013]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [5/7] i2c-designware: enable/disable the controller properly

> +static void __i2c_dw_enable(struct dw_i2c_dev *dev, bool enable)
> +{
> + int timeout = 100;
> +
> + do {
> + dw_writel(dev, enable, DW_IC_ENABLE);
> + if ((dw_readl(dev, DW_IC_ENABLE_STATUS) & 1) == enable)
> + return;
> +
> + usleep_range(25, 250);

This would wait 25ms max. Is there a timeout value specified in the docs?

> + } while (timeout-- > 0);

while (timeout--)?



\
 
 \ /
  Last update: 2013-04-09 12:01    [W:0.129 / U:3.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site