aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2025-01-21 21:44:00 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2025-02-21 10:33:04 +0100
commit9e38acacb9d809b97a0bdc5c76e725355a47158a (patch)
tree7cdd3705d42d5064caa81316b2b78e23a5a52655
parentmedia: mgb4: Added support for additional GMSL modules variants (diff)
downloadwireguard-linux-9e38acacb9d809b97a0bdc5c76e725355a47158a.tar.xz
wireguard-linux-9e38acacb9d809b97a0bdc5c76e725355a47158a.zip
media: i2c: adv748x: Fix test pattern selection mask
The mask to select the test-pattern in register ADV748X_SDP_FRP is incorrect, it's the lower 3 bits which controls the pattern. The GENMASK() macro is used incorrectly and the generated mask is 0x0e instead of 0x07. The result is that not all test patterns are selectable, and that in some cases the wrong test pattern is activated. Fix this by correcting the GENMASK(). Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") Cc: stable@vger.kernel.org Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: fixed tiny typo in commit log: my -> by]
-rw-r--r--drivers/media/i2c/adv748x/adv748x.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h
index 9bc0121d0eff..2c1db5968af8 100644
--- a/drivers/media/i2c/adv748x/adv748x.h
+++ b/drivers/media/i2c/adv748x/adv748x.h
@@ -320,7 +320,7 @@ struct adv748x_state {
/* Free run pattern select */
#define ADV748X_SDP_FRP 0x14
-#define ADV748X_SDP_FRP_MASK GENMASK(3, 1)
+#define ADV748X_SDP_FRP_MASK GENMASK(2, 0)
/* Saturation */
#define ADV748X_SDP_SD_SAT_U 0xe3 /* user_map_rw_reg_e3 */