]> Zhao Yanbai Git Server - minix.git/commit
libi2cdriver: add functions for IC register access 26/826/4
authorThomas Cort <tcort@minix3.org>
Mon, 16 Sep 2013 17:33:00 +0000 (13:33 -0400)
committerThomas Cort <tcort@minix3.org>
Wed, 18 Sep 2013 12:10:26 +0000 (08:10 -0400)
commit75bd3009d367388da31498c63a71b54eafaa2774
tree3ca24ffa0437b1ac8192103a0eea4fce773e93aa
parent43471c3110dfa23abded179ee491298fd57bda23
libi2cdriver: add functions for IC register access

Many i2c device drivers used similar code to access registers on
the ICs they drive. This commit implements that functionality in
libi2cdriver and updates the drivers to use the library instead of
their own register access functions. The net result is 375+ fewer
lines of code and less work for people developing new drivers.

The two exceptions were cat24c256 and parts of tda19988. They access
the bus in uncommon ways. It doesn't make sense at this time to
move their read/write functions into libi2cdriver.

Change-Id: Id8280b71af33b710a49944d7f20a7262be9f5988
drivers/bmp085/bmp085.c
drivers/sht21/sht21.c
drivers/tda19988/tda19988.c
drivers/tps65217/tps65217.c
drivers/tps65950/rtc.c
drivers/tps65950/tps65950.c
drivers/tps65950/tps65950.h
drivers/tsl2550/tsl2550.c
include/minix/i2cdriver.h
lib/libi2cdriver/i2cdriver.c