Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 496 → Rev 515

/shark/trunk/drivers/i2c/i2c-core.c
21,7 → 21,7
All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl>
SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> */
 
/* $Id: i2c-core.c,v 1.4 2004-02-24 14:28:42 giacomo Exp $ */
/* $Id: i2c-core.c,v 1.5 2004-03-20 12:22:37 giacomo Exp $ */
 
#define DEBUG 1 /* needed to pick up the dev_dbg() calls */
 
131,8 → 131,8
//down(&core_lists);
 
adap->nr = nr++;
init_MUTEX(&adap->bus_lock);
init_MUTEX(&adap->clist_lock);
//init_MUTEX(&adap->bus_lock);
//init_MUTEX(&adap->clist_lock);
list_add_tail(&adap->list,&adapters);
INIT_LIST_HEAD(&adap->clients);
 
/shark/trunk/drivers/i2c/algos/i2c-algo-bit.c
21,7 → 21,7
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
 
/* $Id: i2c-algo-bit.c,v 1.1 2004-01-28 15:12:02 giacomo Exp $ */
/* $Id: i2c-algo-bit.c,v 1.2 2004-03-20 12:22:37 giacomo Exp $ */
 
/* #define DEBUG 1 */
 
90,7 → 90,7
if (adap->getscl == NULL )
return 0;
 
start=jiffies;
start=jiffies26;
while (! getscl(adap) ) {
/* the hw knows how to read the clock line,
* so we wait until it actually gets high.
97,12 → 97,12
* This is safer as some chips may hold it low
* while they are processing data internally.
*/
if (time_after_eq(jiffies, start+adap->timeout)) {
if (time_after_eq(jiffies26, start+adap->timeout)) {
return -ETIMEDOUT;
}
cond_resched();
//cond_resched();
}
DEBSTAT(printk(KERN_DEBUG "needed %ld jiffies\n", jiffies-start));
DEBSTAT(printk(KERN_DEBUG "needed %ld jiffies\n", jiffies26-start));
udelay(adap->udelay);
return 0;
}