]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: i2c: adv748x: Fix test pattern selection mask
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tue, 21 Jan 2025 20:44:00 +0000 (21:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:13 +0000 (07:39 +0200)
commit68b37e31ce045ec697b4bdc587f35cac8f97e7b6
tree868ff3299432f7e2f5cb06c9d5c45e6495b3c726
parent5871166a1c706d98e9976e2e09cef9413c5db982
media: i2c: adv748x: Fix test pattern selection mask

commit 9e38acacb9d809b97a0bdc5c76e725355a47158a upstream.

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]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/adv748x/adv748x.h