OMAP24xx I2C: Add support for set-speed

Adds support for set-speed on the OMAP24xx I2C Adapter.

Changes to omap24_i2c_write(...) for polling ARDY Bit from IRQ-Status.
Otherwise on a subsequent call the transfer of last byte from the
predecessor is aborted and therefore lost. For exmaple when
i2c_write(...) is followed by a i2c_setspeed(...) (which has to
deactivate and activate master for changing psc,...).

Minor cosmetical changes.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Cc: Heiko Schocher <hs@denx.de>
This commit is contained in:
Hannes Petermaier
2014-02-03 21:22:18 +01:00
committed by Heiko Schocher
parent d22643e7e8
commit d5243359e1
2 changed files with 98 additions and 50 deletions

View File

@ -68,6 +68,7 @@ struct i2c_adapter {
uint (*set_bus_speed)(struct i2c_adapter *adap,
uint speed);
int speed;
int waitdelay;
int slaveaddr;
int init_done;
int hwadapnr;