Hi Jean Delvare
Thank you for checking patch.
> > + if (reg->val > 0xff)
>
> ... and apparently you expect an 8-bit value anyway.
>
> > + return -EIO;
> > +
> > + return 0;
> > +}
>
> Also note that i2c_smbus_read_* functions can return a negative value
> on error. As you are handling this case in the "set" function below,
> you may want to do the same for the "get" function above. If you really
> want to call i2c_smbus_read_byte_data() as I suspect, then it's much
> more useful to check for < 0 than > 0xff, as i2c_smbus_read_byte_data()
> can't return a value greater than 0xff by construction.
Sorry. this came from mt9m001.c that is base of soc_camera_platform.c.
I'll fix it up.
> > + if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent),
> > + I2C_FUNC_SMBUS_BYTE_DATA)) {
> > + dev_err(&client->dev,
> > + "I2C-Adapter doesn't support I2C_FUNC_SMBUS_BYTE\n");
>
> This comment doesn't match the actual check.
Sorry. this came from mt9m001.c that is base of soc_camera_platform.c.
I'll fix it up.
Thank you again.
/Morimoto
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c