linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCHv2 27/27] OMAPDSS: connector-analog-tv: Add DT support
Date: Wed, 27 Aug 2014 09:37:37 +0000	[thread overview]
Message-ID: <53FDA6E1.9030103@ti.com> (raw)
In-Reply-To: <21704808.AJTjtXoZly@avalon>

[-- Attachment #1: Type: text/plain, Size: 3891 bytes --]

On 26/08/14 19:58, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Monday 16 December 2013 16:56:34 Tomi Valkeinen wrote:
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>>  .../video/omap2/displays-new/connector-analog-tv.c | 66 ++++++++++++++++++-
>>  1 file changed, 65 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c
>> b/drivers/video/omap2/displays-new/connector-analog-tv.c index
>> ccd9073f706f..ebed25a86487 100644
>> --- a/drivers/video/omap2/displays-new/connector-analog-tv.c
>> +++ b/drivers/video/omap2/displays-new/connector-analog-tv.c
>> @@ -12,6 +12,7 @@
>>  #include <linux/slab.h>
>>  #include <linux/module.h>
>>  #include <linux/platform_device.h>
>> +#include <linux/of.h>
>>
>>  #include <video/omapdss.h>
>>  #include <video/omap-panel-data.h>
>> @@ -42,6 +43,12 @@ static const struct omap_video_timings tvc_pal_timings =
>> { .interlace	= true,
>>  };
>>
>> +static const struct of_device_id tvc_of_match[];
>> +
>> +struct tvc_of_data {
>> +	enum omap_dss_venc_type connector_type;
>> +};
>> +
>>  #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
>>
>>  static int tvc_connect(struct omap_dss_device *dssdev)
>> @@ -92,7 +99,10 @@ static int tvc_enable(struct omap_dss_device *dssdev)
>>  	in->ops.atv->set_timings(in, &ddata->timings);
>>
>>  	in->ops.atv->set_type(in, ddata->connector_type);
>> -	in->ops.atv->invert_vid_out_polarity(in, ddata->invert_polarity);
>> +
>> +	if (!ddata->dev->of_node)
>> +		in->ops.atv->invert_vid_out_polarity(in,
>> +			ddata->invert_polarity);
>>
>>  	r = in->ops.atv->enable(in);
>>  	if (r)
>> @@ -205,6 +215,35 @@ static int tvc_probe_pdata(struct platform_device
>> *pdev) return 0;
>>  }
>>
>> +static int tvc_probe_of(struct platform_device *pdev)
>> +{
>> +	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
>> +	struct device_node *node = pdev->dev.of_node;
>> +	struct omap_dss_device *in;
>> +	const struct of_device_id *match;
>> +	const struct tvc_of_data *data;
>> +
>> +	match = of_match_node(tvc_of_match, pdev->dev.of_node);
>> +	if (!match) {
>> +		dev_err(&pdev->dev, "unsupported device\n");
>> +		return -ENODEV;
>> +	}
>> +
>> +	data = match->data;
>> +
>> +	in = omapdss_of_find_source_for_first_ep(node);
>> +	if (IS_ERR(in)) {
>> +		dev_err(&pdev->dev, "failed to find video source\n");
>> +		return PTR_ERR(in);
>> +	}
>> +
>> +	ddata->in = in;
>> +
>> +	ddata->connector_type = data->connector_type;
>> +
>> +	return 0;
>> +}
>> +
>>  static int tvc_probe(struct platform_device *pdev)
>>  {
>>  	struct panel_drv_data *ddata;
>> @@ -222,6 +261,10 @@ static int tvc_probe(struct platform_device *pdev)
>>  		r = tvc_probe_pdata(pdev);
>>  		if (r)
>>  			return r;
>> +	} else if (pdev->dev.of_node) {
>> +		r = tvc_probe_of(pdev);
>> +		if (r)
>> +			return r;
>>  	} else {
>>  		return -ENODEV;
>>  	}
>> @@ -263,12 +306,33 @@ static int __exit tvc_remove(struct platform_device
>> *pdev) return 0;
>>  }
>>
>> +static const struct tvc_of_data tv_svideo_data = {
>> +	.connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
>> +};
>> +
>> +static const struct tvc_of_data tv_composite_video_data = {
>> +	.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
>> +};
>> +
>> +static const struct of_device_id tvc_of_match[] = {
>> +	{
>> +		.compatible = "svideo-connector",
>> +		.data = &tv_svideo_data,
>> +	},
>> +	{
>> +		.compatible = "composite-video-connector",
> 
> I've just noticed that this doesn't match the bindings that document the 
> compatible value to be "composite-connector".

Thanks. arch/arm/boot/dts/omap3-n900.dts uses the same value as in the
bindings document, so I think the proper fix is to change the compatible
value for this driver. I'll make a patch.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-08-27  9:37 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 14:56 [PATCHv2 00/27] OMAPDSS: DT support v2 Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 01/27] ARM: OMAP: remove DSS DT hack Tomi Valkeinen
2013-12-16 18:41   ` Tony Lindgren
2013-12-17  6:45     ` Tomi Valkeinen
2013-12-17 15:30       ` Tony Lindgren
2013-12-18  7:12         ` Tomi Valkeinen
2013-12-18 10:21           ` Tomi Valkeinen
2013-12-18 17:33             ` Tony Lindgren
2013-12-18 17:32           ` Tony Lindgren
2013-12-16 14:56 ` [PATCHv2 02/27] OMAPDSS: remove DT hacks for regulators Tomi Valkeinen
2013-12-16 18:42   ` Tony Lindgren
2013-12-17  6:42     ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 03/27] ARM: OMAP2+: add omapdss_init_of() Tomi Valkeinen
2013-12-16 18:46   ` Tony Lindgren
2013-12-17  6:20     ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 04/27] OMAPDSS: add 'label' support for DT Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 05/27] OMAPDSS: get dssdev->alias from DT alias Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 06/27] OMAPFB: clean up default display search Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 08/27] OMAPDSS: add of helpers Tomi Valkeinen
2013-12-17  7:12   ` Archit Taneja
2013-12-17  7:01     ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 09/27] OMAPDSS: Add DT support to DSS, DISPC, DPI and SDI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 10/27] OMAPDSS: Add DT support to HDMI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 11/27] OMAPDSS: Add DT support to VENC Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 12/27] OMAPDSS: Add DT support to DSI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 13/27] ARM: omap3.dtsi: add omapdss information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 14/27] ARM: omap4.dtsi: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 15/27] ARM: omap4-panda.dts: add display information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 16/27] ARM: omap4-sdp.dts: " Tomi Valkeinen
     [not found] ` <1387205794-32246-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2013-12-16 14:56   ` [PATCHv2 07/27] OMAPFB: search for default display with DT alias Tomi Valkeinen
2013-12-16 14:56   ` [PATCHv2 17/27] ARM: omap3-tobi.dts: add lcd (TEST) Tomi Valkeinen
2013-12-17 17:17     ` Florian Vaussard
2013-12-16 14:56 ` [PATCHv2 18/27] ARM: omap3-beagle.dts: add display information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 19/27] ARM: omap3-beagle-xm.dts: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 20/27] ARM: omap3-igep0020.dts: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 21/27] OMAPDSS: panel-dsi-cm: Add DT support Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 22/27] OMAPDSS: encoder-tfp410: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 23/27] OMAPDSS: connector-dvi: " Tomi Valkeinen
2013-12-17  7:05   ` Sascha Hauer
2013-12-17  7:15     ` Tomi Valkeinen
2013-12-17 15:15       ` Laurent Pinchart
2013-12-18 10:41         ` Tomi Valkeinen
     [not found]           ` <52B17BBF.8090003-l0cyMroinI0@public.gmane.org>
2013-12-18 14:02             ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 24/27] OMAPDSS: encoder-tpd12s015: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 25/27] OMAPDSS: hdmi-connector: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 26/27] OMAPDSS: panel-dpi: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 27/27] OMAPDSS: connector-analog-tv: " Tomi Valkeinen
     [not found]   ` <1387205794-32246-28-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2014-08-26 16:58     ` Laurent Pinchart
2014-08-27  9:37       ` Tomi Valkeinen [this message]

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=53FDA6E1.9030103@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /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).