Hi Julien Thank you for your patch, and sorry for the late reply. I tested it, and it works great. On 1/12/24 10:52, Julien Massot wrote: [...] > @@ -1623,37 +1536,33 @@ static int vgxy61_configure(struct vgxy61_dev *sensor) > static int vgxy61_patch(struct vgxy61_dev *sensor) > { > struct i2c_client *client = sensor->i2c_client; > - int patch, ret; > + u64 patch; > + int ret; > > ret = vgxy61_write_array(sensor, VGXY61_REG_FWPATCH_START_ADDR, > sizeof(patch_array), patch_array); > - if (ret) > - return ret; > - > - ret = vgxy61_write_reg(sensor, VGXY61_REG_STBY, 0x10, NULL); > + cci_write(sensor->regmap, VGXY61_REG_STBY, 0x10, &ret); > if (ret) > return ret; > > ret = vgxy61_poll_reg(sensor, VGXY61_REG_STBY, 0, VGXY61_TIMEOUT_MS); > - if (ret) > + cci_read(sensor->regmap, VGXY61_REG_FWPATCH_REVISION, &patch, &ret); > + if (ret < 0) > return ret; > > - patch = vgxy61_read_reg(sensor, VGXY61_REG_FWPATCH_REVISION); > - if (patch < 0) > - return patch; > - > if (patch != (VGXY61_FWPATCH_REVISION_MAJOR << 12) + > (VGXY61_FWPATCH_REVISION_MINOR << 8) + > VGXY61_FWPATCH_REVISION_MICRO) { > - dev_err(&client->dev, "bad patch version expected %d.%d.%d got %d.%d.%d\n", > + dev_err(&client->dev, > + "bad patch version expected %d.%d.%d got %u.%u.%u\n", > VGXY61_FWPATCH_REVISION_MAJOR, > VGXY61_FWPATCH_REVISION_MINOR, > VGXY61_FWPATCH_REVISION_MICRO, > - patch >> 12, (patch >> 8) & 0x0f, patch & 0xff); > + (u16)patch >> 12, ((u16)patch >> 8) & 0x0f, (u16)patch & 0xff); Checkpatch is complaining about this line being 87 characters long instead of 80. Could a maintainer apply with correct line wrap ? Thank you. With that fixed : Reviewed-by: Benjamin Mugnier <benjamin.mugnier@xxxxxxxxxxx> > return -ENODEV; > } > - dev_dbg(&client->dev, "patch %d.%d.%d applied\n", > - patch >> 12, (patch >> 8) & 0x0f, patch & 0xff); > + dev_dbg(&client->dev, "patch %u.%u.%u applied\n", > + (u16)patch >> 12, ((u16)patch >> 8) & 0x0f, (u16)patch & 0xff); > > return 0; > } [...] -- Regards, Benjamin