linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Yong Deng <yong.deng@magewell.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Mylene Josserand <mylene.josserand@bootlin.com>
Subject: [PATCH 6/7] media: sun6i: Invert the polarities
Date: Mon,  5 Mar 2018 10:35:33 +0100	[thread overview]
Message-ID: <20180305093535.11801-7-maxime.ripard@bootlin.com> (raw)
In-Reply-To: <20180305093535.11801-1-maxime.ripard@bootlin.com>

A good look at an oscilloscope and test with a camera have shown that the
polarity of all signals are actually reversed compared to the polarity
documented in the datasheet for the clock, HSYNC and VSYNC signals.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index e0b39ea641aa..a93bc25ff372 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -398,12 +398,12 @@ static void sun6i_csi_setup_bus(struct sun6i_csi_dev *sdev)
 		if (flags & V4L2_MBUS_FIELD_EVEN_LOW)
 			cfg |= CSI_IF_CFG_FIELD_POSITIVE;
 
-		if (flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
+		if (flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
 			cfg |= CSI_IF_CFG_VREF_POL_POSITIVE;
-		if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
+		if (flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
 			cfg |= CSI_IF_CFG_HREF_POL_POSITIVE;
 
-		if (flags & V4L2_MBUS_PCLK_SAMPLE_FALLING)
+		if (flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
 			cfg |= CSI_IF_CFG_CLK_POL_FALLING_EDGE;
 		break;
 	case V4L2_MBUS_BT656:
-- 
2.14.3

  parent reply	other threads:[~2018-03-05  9:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27  2:05 [PATCH v8 0/2] Initial Allwinner V3s CSI Support Yong Deng
2018-03-05  9:35 ` [PATCH 0/7] media: sun6i: Various fixes and improvements Maxime Ripard
2018-03-05  9:35   ` [PATCH 1/7] media: sun6i: Fill dma_pfn_offset to accomodate for the RAM offset Maxime Ripard
2018-03-05  9:35   ` [PATCH 2/7] media: sun6i: Reduce the error level Maxime Ripard
2018-03-05  9:35   ` [PATCH 3/7] media: sun6i: Pass the sun6i_csi_dev pointer to our helpers Maxime Ripard
2018-03-05  9:35   ` [PATCH 4/7] media: sun6i: Don't emit a warning when the configured format isn't found Maxime Ripard
2018-03-05  9:35   ` [PATCH 5/7] media: sun6i: Support the YUYV format properly Maxime Ripard
2018-03-05  9:35   ` Maxime Ripard [this message]
2018-03-05  9:35   ` [PATCH 7/7] media: sun6i: Expose controls on the v4l2_device Maxime Ripard
2018-03-05  9:35   ` [PATCH 8/8] media: sun6i: Add g_parm/s_parm ioctl support Maxime Ripard
2018-03-05  9:46     ` Maxime Ripard
2018-03-05 10:35   ` [PATCH 0/7] media: sun6i: Various fixes and improvements Yong
2018-03-06  9:34     ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180305093535.11801-7-maxime.ripard@bootlin.com \
    --to=maxime.ripard@bootlin.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mylene.josserand@bootlin.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.org \
    --cc=yong.deng@magewell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).