Skip to contentSkip to conversation

i2c_reg_read() on 8xx

U-Boot Timur Tabi 1 participant 1 message Oct 22, 2008

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

Wolfgang,

Mike Frysinger helped me resolve the problem with i2c_reg_read() on Blackfin, so I'll be posting a new patch soon. However, I noticed that 8xx has a problem, too:

uchar
i2c_reg_read(uchar i2c_addr, uchar reg)

{
        uchar buf;

        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);

        i2c_read(i2c_addr, reg, 1, &buf, 1);

        return (buf);
}

Is the call to i2c_init() necessary on 8xx boards? Shouldn't I2C have already been initialized?

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale