Commit Graph

4 Commits (e407f1a4c849dd5b4aac9ddd31d2542e45077847)

Author SHA1 Message Date
Michael Lee 60ccfbbad0 ramips: update i2c drivers
* add rt_i2c structure to store driver data
* rewrite read/write check function and add i2c error status check.
  so we don't need to wait until time out.
* add 10 bits address support. according to the data sheet i think
  it is possible. but i haven't verify it.
* the most important is start transfer only need once. otherwise
  it cause I2C_STARTERR status.
* add set i2c clock speed register by dts options "clock-frequency".
  not just hard code it.
* add mt7621 i2c driver. i just copy i2c-ralink.c and change register
  names. and the hardware don't support error status. so i remove it.
  but the logic is the same.

Signed-off-by: Michael Lee <igvtee@gmail.com>
8 years ago
John Crispin b180f24a3b Revert "ramips: update i2c drivers"
This reverts commit d8202a8409.

the commit broke I2C on various boards.

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Michael Lee d8202a8409 ramips: update i2c drivers
* add rt_i2c structure to store driver data
* rewrite read/write check function and add i2c error status check.
  so we don't need to wait until time out.
* add 10 bits address support. according to the data sheet i think
  it is possible. but i haven't verify it.
* the most important is start transfer only need once. otherwise
  it cause I2C_STARTERR status.
* add set i2c clock speed register by dts options "clock-frequency".
  not just hard code it.
* add mt7621 i2c driver. i just copy i2c-ralink.c and change register
  names. and the hardware don't support error status. so i remove it.
  but the logic is the same.

Signed-off-by: Michael Lee <igvtee@gmail.com>
8 years ago
Felix Fietkau d041e8b44b ramips: add linux 4.4 support, update mt7621 subtarget to 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48951
8 years ago