mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
media: i2c: ds90ub953: Clear CRC errors in ub953_log_status()
Clear the CRC error counter after showing it in ub953_log_status() to make its behavior match the other counter values. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
0aac971d42
commit
b0ab26fa4a
@@ -65,6 +65,9 @@
|
||||
#define UB953_REG_GPIO_INPUT_CTRL_OUT_EN(n) BIT(4 + (n))
|
||||
#define UB953_REG_GPIO_INPUT_CTRL_INPUT_EN(n) BIT(0 + (n))
|
||||
|
||||
#define UB953_REG_BC_CTRL 0x49
|
||||
#define UB953_REG_BC_CTRL_CRC_ERR_CLR BIT(3)
|
||||
|
||||
#define UB953_REG_REV_MASK_ID 0x50
|
||||
#define UB953_REG_GENERAL_STATUS 0x52
|
||||
|
||||
@@ -618,6 +621,12 @@ static int ub953_log_status(struct v4l2_subdev *sd)
|
||||
ub953_read(priv, UB953_REG_CRC_ERR_CNT2, &v2);
|
||||
dev_info(dev, "CRC error count %u\n", v1 | (v2 << 8));
|
||||
|
||||
/* Clear CRC error counter */
|
||||
if (v1 || v2)
|
||||
regmap_update_bits(priv->regmap, UB953_REG_BC_CTRL,
|
||||
UB953_REG_BC_CTRL_CRC_ERR_CLR,
|
||||
UB953_REG_BC_CTRL_CRC_ERR_CLR);
|
||||
|
||||
ub953_read(priv, UB953_REG_CSI_ERR_CNT, &v);
|
||||
dev_info(dev, "CSI error count %u\n", v);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user