if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = ad9389b_rd(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ad9389b_wr(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = adv7183_read(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
adv7183_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 1;
switch (reg->reg >> 8) {
case 0:
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
switch (reg->reg >> 8) {
case 0:
io_write(sd, reg->reg & 0xff, reg->val & 0xff);
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 1;
reg->val = cs5345_read(sd, reg->reg & 0x1f);
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
cs5345_write(sd, reg->reg & 0x1f, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 1;
reg->val = cx25840_read(client, reg->reg & 0x0fff);
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
cx25840_write(client, reg->reg & 0x0fff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (reg->reg != 0)
return -EINVAL;
reg->size = 1;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (reg->reg != 0)
return -EINVAL;
state->input = reg->val & 0x0303;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = mt9v011_read(sd, reg->reg & 0xff);
reg->size = 2;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff);
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ret = ov7670_read(sd, reg->reg & 0xff, &val);
reg->val = val;
reg->size = 1;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ov7670_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = saa711x_read(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
saa711x_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = saa7127_read(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
saa7127_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = saa717x_read(sd, reg->reg);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
saa717x_write(sd, addr, val);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 1;
reg->val = ths7303_read(sd, reg->reg);
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ths7303_write(sd, reg->reg, reg->val);
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
res = tvp5150_read(sd, reg->reg & 0xff);
if (res < 0) {
v4l2_err(sd, "%s: failed with error = %d\n", __func__, res);
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
tvp5150_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
*
* Get the value of a TVP7002 decoder device register.
* Returns zero when successful, -EINVAL if register read fails or
- * access to I2C client fails, -EPERM if the call is not allowed
- * by disabled CAP_SYS_ADMIN.
+ * access to I2C client fails.
*/
static int tvp7002_g_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ret = tvp7002_read(sd, reg->reg & 0xff, &val);
reg->val = val;
* @reg: ptr to v4l2_dbg_register struct
*
* Get the value of a TVP7002 decoder device register.
- * Returns zero when successful, -EINVAL if register read fails or
- * -EPERM if call not allowed.
+ * Returns zero when successful, -EINVAL if register read fails.
*/
static int tvp7002_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg)
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = upd64031a_read(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = upd64083_read(sd, reg->reg & 0xff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
upd64083_write(sd, reg->reg & 0xff, reg->val & 0xff);
return 0;
}
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->val = vs6624_read(sd, reg->reg & 0xffff);
reg->size = 1;
return 0;
if (!v4l2_chip_match_i2c_client(client, ®->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
vs6624_write(sd, reg->reg & 0xffff, reg->val & 0xff);
return 0;
}