]> asedeno.scripts.mit.edu Git - linux.git/commit
media: sun4i-csi: Fix [HV]sync polarity handling
authorChen-Yu Tsai <wens@csie.org>
Sun, 15 Dec 2019 16:59:14 +0000 (17:59 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 4 Jan 2020 07:17:57 +0000 (08:17 +0100)
commit1948dcf0f928b8bcdca57ca3fba8545ba380fc29
tree642cd2b8f06675a284e0956b003395594da2c4a4
parentcf9e6d5dbdd56ef2aa72f28c806711c4293c8848
media: sun4i-csi: Fix [HV]sync polarity handling

The Allwinner camera sensor interface has a different definition of
[HV]sync. While the timing diagram uses the names HSYNC and VSYNC,
the note following the diagram and register names use HREF and VREF.
Combined they imply the hardware uses either [HV]REF or inverted
[HV]SYNC. There are also registers to set horizontal skip lengths
in pixels and vertical skip lengths in lines, also known as back
porches.

Fix the polarity handling by using the opposite polarity flag for
the checks. Also rename `[hv]sync_pol` to `[hv]ref_pol` to better
match the hardware register description.

Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c