rc = i2c_smbus_read_byte_data(c, addr);
if (rc < 0) {
- v4l2_err(sd, "i2c i/o error: rc == %d\n", rc);
+ dev_err(sd->dev, "i2c i/o error: rc == %d\n", rc);
return rc;
}
- v4l2_dbg(2, debug, sd, "tvp5150: read 0x%02x = 0x%02x\n", addr, rc);
+ dev_dbg_lvl(sd->dev, 2, debug, "tvp5150: read 0x%02x = %02x\n", addr, rc);
return rc;
}
struct i2c_client *c = v4l2_get_subdevdata(sd);
int rc;
- v4l2_dbg(2, debug, sd, "tvp5150: writing 0x%02x 0x%02x\n", addr, value);
+ dev_dbg_lvl(sd->dev, 2, debug, "tvp5150: writing %02x %02x\n", addr, value);
rc = i2c_smbus_write_byte_data(c, addr, value);
if (rc < 0)
- v4l2_err(sd, "i2c i/o error: rc == %d\n", rc);
+ dev_err(sd->dev, "i2c i/o error: rc == %d\n", rc);
return rc;
}
break;
}
- v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i, output=%i "
- "=> tvp5150 input=%i, opmode=%i\n",
+ dev_dbg_lvl(sd->dev, 1, debug, "Selecting video route: route input=%i, output=%i => tvp5150 input=%i, opmode=%i\n",
decoder->input, decoder->output,
input, opmode);
*/
val = tvp5150_read(sd, TVP5150_MISC_CTL);
if (val < 0) {
- v4l2_err(sd, "%s: failed with error = %d\n", __func__, val);
+ dev_err(sd->dev, "%s: failed with error = %d\n", __func__, val);
return;
}
const struct i2c_vbi_ram_value *regs = vbi_ram_default;
int line;
- v4l2_dbg(1, debug, sd, "g_sliced_vbi_cap\n");
+ dev_dbg_lvl(sd->dev, 1, debug, "g_sliced_vbi_cap\n");
memset(cap, 0, sizeof *cap);
while (regs->reg != (u16)-1 ) {
int pos=0;
if (std == V4L2_STD_ALL) {
- v4l2_err(sd, "VBI can't be configured without knowing number of lines\n");
+ dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
return 0;
} else if (std & V4L2_STD_625_50) {
/* Don't follow NTSC Line number convension */
int i, ret = 0;
if (std == V4L2_STD_ALL) {
- v4l2_err(sd, "VBI can't be configured without knowing number of lines\n");
+ dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
return 0;
} else if (std & V4L2_STD_625_50) {
/* Don't follow NTSC Line number convension */
for (i = 0; i <= 1; i++) {
ret = tvp5150_read(sd, reg + i);
if (ret < 0) {
- v4l2_err(sd, "%s: failed with error = %d\n",
+ dev_err(sd->dev, "%s: failed with error = %d\n",
__func__, ret);
return 0;
}
fmt = VIDEO_STD_SECAM_BIT;
}
- v4l2_dbg(1, debug, sd, "Set video std register to %d.\n", fmt);
+ dev_dbg_lvl(sd->dev, 1, debug, "Set video std register to %d.\n", fmt);
tvp5150_write(sd, TVP5150_VIDEO_STD, fmt);
return 0;
}
f->field = V4L2_FIELD_ALTERNATE;
f->colorspace = V4L2_COLORSPACE_SMPTE170M;
- v4l2_dbg(1, debug, sd, "width = %d, height = %d\n", f->width,
+ dev_dbg_lvl(sd->dev, 1, debug, "width = %d, height = %d\n", f->width,
f->height);
return 0;
}
sel->target != V4L2_SEL_TGT_CROP)
return -EINVAL;
- v4l2_dbg(1, debug, sd, "%s left=%d, top=%d, width=%d, height=%d\n",
+ dev_dbg_lvl(sd->dev, 1, debug, "%s left=%d, top=%d, width=%d, height=%d\n",
__func__, rect.left, rect.top, rect.width, rect.height);
/* tvp5150 has some special limits */
res = tvp5150_read(sd, reg->reg & 0xff);
if (res < 0) {
- v4l2_err(sd, "%s: failed with error = %d\n", __func__, res);
+ dev_err(sd->dev, "%s: failed with error = %d\n", __func__, res);
return res;
}
core->dev_id = (regs[0] << 8) | regs[1];
core->rom_ver = (regs[2] << 8) | regs[3];
- v4l2_info(sd, "tvp%04x (%u.%u) chip found @ 0x%02x (%s)\n",
+ dev_info(sd->dev, "tvp%04x (%u.%u) chip found @ 0x%02x (%s)\n",
core->dev_id, regs[2], regs[3], c->addr << 1,
c->adapter->name);
if (core->dev_id == 0x5150 && core->rom_ver == 0x0321) {
- v4l2_info(sd, "tvp5150a detected.\n");
+ dev_info(sd->dev, "tvp5150a detected.\n");
} else if (core->dev_id == 0x5150 && core->rom_ver == 0x0400) {
- v4l2_info(sd, "tvp5150am1 detected.\n");
+ dev_info(sd->dev, "tvp5150am1 detected.\n");
/* ITU-T BT.656.4 timing */
tvp5150_write(sd, TVP5150_REV_SELECT, 0);
} else if (core->dev_id == 0x5151 && core->rom_ver == 0x0100) {
- v4l2_info(sd, "tvp5151 detected.\n");
+ dev_info(sd->dev, "tvp5151 detected.\n");
} else {
- v4l2_info(sd, "*** unknown tvp%04x chip detected.\n",
+ dev_info(sd->dev, "*** unknown tvp%04x chip detected.\n",
core->dev_id);
}
for_each_available_child_of_node(connectors, child) {
ret = of_property_read_u32(child, "input", &input_type);
if (ret) {
- v4l2_err(&decoder->sd,
+ dev_err(decoder->sd.dev,
"missing type property in node %s\n",
child->name);
goto err_connector;
/* Each input connector can only be defined once */
if (input->name) {
- v4l2_err(&decoder->sd,
+ dev_err(decoder->sd.dev,
"input %s with same type already exists\n",
input->name);
ret = -EINVAL;
ret = of_property_read_string(child, "label", &name);
if (ret < 0) {
- v4l2_err(&decoder->sd,
+ dev_err(decoder->sd.dev,
"missing label property in node %s\n",
child->name);
goto err_connector;
if (IS_ENABLED(CONFIG_OF) && np) {
res = tvp5150_parse_dt(core, np);
if (res) {
- v4l2_err(sd, "DT parsing error: %d\n", res);
+ dev_err(sd->dev, "DT parsing error: %d\n", res);
return res;
}
} else {
struct v4l2_subdev *sd = i2c_get_clientdata(c);
struct tvp5150 *decoder = to_tvp5150(sd);
- v4l2_dbg(1, debug, sd,
+ dev_dbg_lvl(sd->dev, 1, debug,
"tvp5150.c: removing tvp5150 adapter on address 0x%x\n",
c->addr << 1);