aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2020-09-22 11:08:34 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-12-07 17:04:36 +0100
commitba9dfeeb4fbe70885ac5372adf463659a9d499da (patch)
tree88c5b3e07dd15a65e6cf67e44096260e931c0f61
parent7c66f58f1c1fb3181074a09c4aac21a0e8a283f0 (diff)
media: ccs: Print written register values
This helps debugging register writes. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/i2c/ccs/ccs-reg-access.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/i2c/ccs/ccs-reg-access.c b/drivers/media/i2c/ccs/ccs-reg-access.c
index 3de863e3bf26..b776af2a3c33 100644
--- a/drivers/media/i2c/ccs/ccs-reg-access.c
+++ b/drivers/media/i2c/ccs/ccs-reg-access.c
@@ -338,6 +338,10 @@ int ccs_write_addr_no_quirk(struct ccs_sensor *sensor, u32 reg, u32 val)
put_unaligned_be16(CCS_REG_ADDR(reg), data);
put_unaligned_be32(val << (8 * (sizeof(val) - len)), data + 2);
+ dev_dbg(&client->dev, "writing reg 0x%4.4x value 0x%*.*x (%u)\n",
+ CCS_REG_ADDR(reg), ccs_reg_width(reg) << 1,
+ ccs_reg_width(reg) << 1, val, val);
+
r = ccs_write_retry(client, &msg);
if (r)
dev_err(&client->dev,

Privacy Policy