android_kernel_samsung_a7y1.../drivers/media
Jacopo Mondi 0ba836f7dd media: v4l2: i2c: ov7670: Fix PLL bypass register values
commit 61da76beef1e4f0b6ba7be4f8d0cf0dac7ce1f55 upstream.

The following commits:
commit f6dd927f34d6 ("[media] media: ov7670: calculate framerate properly for ov7675")
commit 04ee6d92047e ("[media] media: ov7670: add possibility to bypass pll for ov7675")
introduced the ability to bypass PLL multiplier and use input clock (xvclk)
as pixel clock output frequency for ov7675 sensor.

PLL is bypassed using register DBLV[7:6], according to ov7670 and ov7675
sensor manuals. Macros used to set DBLV register seem wrong in the
driver, as their values do not match what reported in the datasheet.

Fix by changing DBLV_* macros to use bits [7:6] and set bits [3:0] to
default 0x0a reserved value (according to datasheets).

While at there, remove a write to DBLV register in
"ov7675_set_framerate()" that over-writes the previous one to the same
register that takes "info->pll_bypass" flag into account instead of setting PLL
multiplier to 4x unconditionally.

And, while at there, since "info->pll_bypass" is only used in
set/get_framerate() functions used by ov7675 only, it is not necessary
to check for the device id at probe time to make sure that when using
ov7670 "info->pll_bypass" is set to false.

Fixes: f6dd927f34d6 ("[media] media: ov7670: calculate framerate properly for ov7675")

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-06 16:42:47 +02:00
..
common A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dvb-core A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dvb-frontends A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
firewire A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
i2c media: v4l2: i2c: ov7670: Fix PLL bypass register values 2020-04-06 16:42:47 +02:00
isdbt A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mmc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
platform media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration 2020-04-06 14:52:30 +02:00
radio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tdmb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tuners A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb media: v4l2-ctrls.c/uvc: zero v4l2_event 2020-04-06 10:58:18 +02:00
v4l2-core media: v4l2-ctrls.c/uvc: zero v4l2_event 2020-04-06 10:58:18 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m1shot2-testdev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m1shot2.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m1shot-helper.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m1shot-testdev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m1shot.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
media-device.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
media-devnode.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
media-entity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30