this looks like a copy of i2c_common_all.c