Re: [PATCH v5] media: i2c: tvp514x: add OF support

Prabhakar Lad
2013-05-29T04:19:27Z

Hi Laurent,

On Wed, May 29, 2013 at 6:52 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Prabhakar,
>
> Thanks for the patch.
>
> On Sunday 26 May 2013 18:49:46 Prabhakar Lad wrote:
>> From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>>
>> add OF support for the tvp514x driver.
>>
>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>> Cc: Hans Verkuil <hans.verkuil@cisco.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
>> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Cc: Sakari Ailus <sakari.ailus@iki.fi>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> Cc: Rob Landley <rob@landley.net>
>> Cc: devicetree-discuss@lists.ozlabs.org
>> Cc: linux-doc@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Cc: davinci-linux-open-source@linux.davincidsp.com
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
Thanks for the ack.

> (with two small comment below).
>
>> ---
>> Tested on da850-evm.
>>
[snip]
>
> s/of port/on port/
> s/refer/refer to/
>
OK

>> Documentation/devicetree/bindings/media/video-interfaces.txt.
>> +
>> +Example:
>> +
>> + i2c0@1c22000 {
>> + ...
>> + ...
>> + tvp514x@5c {
>> + compatible = "ti,tvp5146";
>> + reg = <0x5c>;
>> +
>> + port {
>> + tvp514x_1: endpoint {
>> + hsync-active = <1>;
>> + vsync-active = <1>;
>> + pclk-sample = <0>;
>> + };
>> + };
>> + };
>> + ...
>> + };
>> diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
>> index 7438e01..7ed999b 100644
>> --- a/drivers/media/i2c/tvp514x.c
>> +++ b/drivers/media/i2c/tvp514x.c
>> @@ -39,6 +39,7 @@
>> #include <media/v4l2-device.h>
>> #include <media/v4l2-common.h>
>> #include <media/v4l2-mediabus.h>
>> +#include <media/v4l2-of.h>
>> #include <media/v4l2-chip-ident.h>
>> #include <media/v4l2-ctrls.h>
>> #include <media/tvp514x.h>
>> @@ -1055,6 +1056,42 @@ static struct tvp514x_decoder tvp514x_dev = {
>>
>> };
>>
>> +static struct tvp514x_platform_data *
>> +tvp514x_get_pdata(struct i2c_client *client)
>> +{
>> + struct tvp514x_platform_data *pdata = NULL;
>
> No need to initialize pdata to NULL.
>
OK will fix it in the next version.

Regards,
--Prabhakar Lad