devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	LMML <linux-media@vger.kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v2 2/2] media: i2c: tvp7002: add OF support
Date: Sun, 14 Jul 2013 21:42:58 +0200	[thread overview]
Message-ID: <51E2FF42.2090507@gmail.com> (raw)
In-Reply-To: <CA+V-a8u0G6m+VoSc4FPmDxEYmE_vQaL7zu3fUFk3iVKnOywnRA@mail.gmail.com>

Hi Prabhakar,

On 07/12/2013 06:43 AM, Prabhakar Lad wrote:
> On Fri, Jul 12, 2013 at 3:34 AM, Sylwester Nawrocki
> <sylvester.nawrocki@gmail.com>  wrote:
>> On 07/11/2013 07:09 PM, Prabhakar Lad wrote:
[...]
>>>> And include/media/tvp70002.h:
>>>>
>>>>    * fid_polarity:
>>>>    *                      0 ->   the field ID output is set to logic 1 for
>>>> an
>>>> odd
>>>>    *                           field (field 1) and set to logic 0 for an
>>>> even
>>>>    *                           field (field 0).
>>>>    *                      1 ->   operation with polarity inverted.
>>>>
>>>>
>>>> Do you know if the chip automatically selects video sync source
>>>> (sync-on-green
>>>> vs. VSYNC/HSYNC) and there is no need to configure this on the analogue
>>>> input
>>>> side ? At least the driver seems to always select the default SOGIN_1
>>>> input
>>>> (TVP7002_IN_MUX_SEL_1 register is set only at initialization time).
>>>>
>>> Yes the driver is selecting the default SOGIN_1 input.
>>>
>>>> Or perhaps it just outputs on SOGOUT, VSOUT, HSOUT lines whatever is fed
>>>> to
>>>> its analogue inputs, and any further processing unit need to determine
>>>> what
>>>> synchronization signal is present and should be used ?
>>>>
>>>
>>> Yes that correct, there is a register (Sync Detect Status) which
>>> detects the sync for you.
>>>
>>>> I suspect that we don't need, e.g. another endpoint node to specify the
>>>> configuration of the TVP7002 analogue input interface, that would contain
>>>> a property like video-sync.
>>>>
>>>>
>>> If I understand correctly you mean if there are two tvp7002 devices
>>> connected
>>> we don’t need to specify video-sync property, but my question how do we
>>> specify this property in common then ?
>>
>>
>> No, I thought about two port sub-nodes of a single device node, one for the
>> TVP7002 video input and one for the output. But it seems there is no need
>> for that, i.e. to specify the input configuration statically in the
>> firmware.
>> The chip detects the signals automatically, i.e. it uses whatever is
>> available,
>> and it allows querying the selection status at run time. What would really
>> need to be configured statically in DT in that case then ? Some initial
>> video
>> sync configuration ? I guess it could be well hard coded in the driver,
>> since
>> the hardware does run time detection anyway.
>>
> Yes the chip detects the signal automatically, What I want to configure in
> the DT case is say if SOG signal is detected, I want to invert the polarity
> of it this is what I am trying to set in DT case whether to invert or not.
> 0 = Normal operation (default)
> 1 = SOG output polarity inverted
>
> Something similar to fid_polarity.

Then as I suggested earlier, let's just add 'sync-on-green-active' DT
property for that. I wouldn't expect the DT properties to be directly
replacing your driver platform_data members. Saying in the binding that
this is a normal operation and that is an inverted one is not very useful
in general, as you would need to dig in the binding's description what
"normal" exactly means. sync-on-green-active = <1>; seems much more
explicit than, e.g. sync-on-green-inverted. By looking at the
sync-on-green-active property each device driver would determine whether
it means normal or inverted operation for its device.

--
Thanks,
Sylwester

  reply	other threads:[~2013-07-14 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1371923055-29623-1-git-send-email-prabhakar.csengg@gmail.com>
2013-06-22 17:44 ` [PATCH v2 2/2] media: i2c: tvp7002: add OF support Prabhakar Lad
2013-06-30 15:57   ` Sylwester Nawrocki
2013-07-11 17:09     ` Prabhakar Lad
2013-07-11 22:04       ` Sylwester Nawrocki
2013-07-12  4:43         ` Prabhakar Lad
2013-07-14 19:42           ` Sylwester Nawrocki [this message]
2013-07-15 17:09             ` Prabhakar Lad

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=51E2FF42.2090507@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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).