From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Mats Randgaard <matrandg@cisco.com>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFC PATCH 17/15] adv7604: sync polarities from platform data
Date: Tue, 17 Dec 2013 14:15:07 +0100 [thread overview]
Message-ID: <52B04E5B.6020907@xs4all.nl> (raw)
In-Reply-To: <785a2a2445d00fa190ea7cea4671c43fb68e2da5.1386681716.git.hans.verkuil@cisco.com>
Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/i2c/adv7604.c | 5 +++--
include/media/adv7604.h | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index a1fa9a0..3f40616 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2126,9 +2126,10 @@ static int adv7604_core_init(struct v4l2_subdev *sd)
pdata->replicate_av_codes << 1 |
pdata->invert_cbcr << 0);
- /* TODO from platform data */
cp_write(sd, 0x69, 0x30); /* Enable CP CSC */
- io_write(sd, 0x06, 0xa6); /* positive VS and HS */
+
+ /* VS, HS polarities */
+ io_write(sd, 0x06, 0xa0 | pdata->inv_vs_pol << 2 | pdata->inv_hs_pol << 1);
/* Adjust drive strength */
io_write(sd, 0x14, 0x40 | pdata->dr_str << 4 |
diff --git a/include/media/adv7604.h b/include/media/adv7604.h
index 0162c31..053b13c 100644
--- a/include/media/adv7604.h
+++ b/include/media/adv7604.h
@@ -107,6 +107,10 @@ struct adv7604_platform_data {
unsigned replicate_av_codes:1;
unsigned invert_cbcr:1;
+ /* IO register 0x06 */
+ unsigned inv_vs_pol:1;
+ unsigned inv_hs_pol:1;
+
/* IO register 0x14 */
unsigned dr_str:2;
unsigned dr_str_clk:2;
--
1.8.4.rc3
next prev parent reply other threads:[~2013-12-17 13:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 13:23 [RFC PATCH 00/15] adv7604: fixes Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 01/15] adv7604: add support for all the digital input ports Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 02/15] adv7604: add hdmi driver strength adjustment Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 03/15] adv7604: support 1366x768 DMT Reduced Blanking Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 04/15] adv7604: adv7604_s_register clean up Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 05/15] adv7604: Receive CEA formats as RGB on VGA (RGB) input Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 06/15] adv7604: select YPbPr if RGB_RANGE_FULL/LIMITED is set for VGA_COMP inputs Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 07/15] adv7604: set CEC address (SPA) in EDID Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 08/15] adv7604: improve EDID handling Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 09/15] adv7604: remove connector type. Never used for anything useful Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 10/15] adv7604: return immediately if the new input is equal to what is configured Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 11/15] adv7604: remove debouncing of ADV7604_FMT_CHANGE events Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 12/15] adv7604: improve HDMI audio handling Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 13/15] adv7604: set restart_stdi_once flag when signal is lost Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 14/15] adv7604: adjust gain and offset for DVI-D signals Hans Verkuil
2013-12-10 13:23 ` [RFC PATCH 15/15] adv7604: Enable HDMI_MODE interrupt Hans Verkuil
2013-12-17 13:14 ` [RFC PATCH 16/15] adv7604: return immediately if the new timings are equal to what is configured Hans Verkuil
2013-12-17 13:15 ` Hans Verkuil [this message]
2013-12-17 13:15 ` [RFC PATCH 18/15] adv7604: initialize timings to CEA 640x480p59.94 Hans Verkuil
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=52B04E5B.6020907@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=matrandg@cisco.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