Optimize the original i2c driver code. Signed-off-by: flyingcys <flyingcys@163.com> Reviewed-by: Chen Wang <unicorn_wang@outlook.com>