int count, u8 *buf)
{
int ret;
-#if 0
- mutex_lock(&tps65910->io_mutex);
-
- ret = tps65910->read(tps65910, reg, count, buf);
-
- mutex_unlock(&tps65910->io_mutex);
-#else
+
+#if defined(CONFIG_MFD_RK610)
int i; //Solve communication conflict when rk610 and 65910 on the same i2c
mutex_lock(&tps65910->io_mutex);
buf[i] = ret & 0x000000FF;
}
}
+ mutex_unlock(&tps65910->io_mutex);
+#else
+ mutex_lock(&tps65910->io_mutex);
+
+ ret = tps65910->read(tps65910, reg, count, buf);
+
mutex_unlock(&tps65910->io_mutex);
#endif
return 0;
int count, u8 *buf)
{
int ret;
-#if 0
- mutex_lock(&tps65910->io_mutex);
- ret = tps65910->write(tps65910, reg, count, buf);
-
- mutex_unlock(&tps65910->io_mutex);
-#else
+#if defined(CONFIG_MFD_RK610)
int i; // //Solve communication conflict when rk610 and 65910 on the same i2c
mutex_lock(&tps65910->io_mutex);
return ret;
}
}
+ mutex_unlock(&tps65910->io_mutex);
+#else
+ mutex_lock(&tps65910->io_mutex);
+
+ ret = tps65910->write(tps65910, reg, count, buf);
+
mutex_unlock(&tps65910->io_mutex);
#endif
return 0;