mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
led: aw9523 reduce R/W time cost [1/1]
PD#SWPL-98173 Problem: R/W operation cost time too long Solution: return immediately while success R/W operation Verify: sc2 ah212 Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com> Change-Id: Id929b146bea1b54b797a4dc64dc10ac5819e8ff5
This commit is contained in:
@@ -348,10 +348,13 @@ static int aw9523_i2c_write(struct meson_aw9523 *aw9523,
|
||||
|
||||
while (cnt < AW_I2C_RETRIES) {
|
||||
ret = i2c_smbus_write_byte_data(aw9523->i2c, reg_addr, reg_data);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pr_err("%s: i2c_write cnt=%d error=%d\n", __func__, cnt, ret);
|
||||
cnt++;
|
||||
msleep(AW_I2C_RETRY_DELAY);
|
||||
cnt++;
|
||||
msleep(AW_I2C_RETRY_DELAY);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user