Hi Geoff,

Sure. I am happy to help.
There can be/is 2 parts of a driver. A generic part that just controls the external peripheral/IC component itself and a "platform" specific part that depends on the way your system/board/HW is designed. Example: let's say your IC component needs a GPIO to be enabled or reset. On my HW, it is GPIO67, on yours it is GPIO3. Instead of using a #define variable that will have to be changed every time the GPIO changes, it is better to declare that GPIO as a "platform data" in your board file. This information is passed to your driver as a pointer in its "probe" function. Generic driver does not change, it uses whatever information it receives from platform data. You just need to define the right parameters in your board file.

In the TVP514x case, the board-dependent parameters are:
- clock polarity
- HSYNC signal polarity
- VSYNC signal polarity
(as defined in the structure below)

static struct tvp514x_platform_data tvp5146_pdata = {
                .clk_polarity = 0,
                 .hs_polarity = 1,
                 .vs_polarity = 1,
};

You need to find how these signals are used in your TVP514x HW and set the right polarity.
You will then use that structure to initialize your driver.

Hopefully, the patches you received from Chris can get you going.

Good luck!
Gilles

2013/2/13 <geoff@thebakershome.net>
Wow, you guys are awesome. I was avoiding sending an e-mail to this list
as I was unsure of the response. So far this has been awesome.

First:
Martin Stoilov: I do not get anything on the I2C except the OMAP3 I2C
interface itself by following your commands. I suspect I need to do some
more work before I can try these again. :(
As for your suggestion to add to board_info, you are correct. Patches from
Chris look to help with this.

Chris Whittenburg: You rock! Thank-you for sharing your code. I have
applied your patches. Can you explain BT656 and what/why it is needed? I
also translated from 5150 to 514x so that I could try with the IC I have.
I hope I do not need to patch the driver, but it looks like you only had
to in order to support the 5150 driver to add support to 5151. (Fingers
crossed that 514x will work). I still need to determine the I2C bus, and
address of the IC. But at least the code is in place. Thank-you so much.

Gilles Talis: Thank-you for your help. Once I get some hardware design
information collected I will try to see what the system finds. When you
say "platform data" what do you mean? Can you explain further, or point me
somewhere to learn?

Thanks again to you all.

Regards,
-Geoff





> Hi,
>
> In addition to what Martin said, if you know on which I2C bus the decoder
> is connected to, you could go and check what devices are listed on that
> bus:
> Let's say TVP514x is on I2C-3, you can do the following:
> $ cd /sys/class/i2c-dev/i2c-3/device
> $ ls
>
> If TVP514x has been successfully registered, you should be able to see stg
> like "3-00YY", where YY is the TVP I2C address in hex.
>
> But from what I can read, you are missing some information. First, your
> board file (board-overo.c) should list your I2C device as Martin
> mentioned,
> and second, you should declare some "Gilles Talis". You can check how it
> is done in this file:
> http://lxr.free-electrons.com/source/arch/arm/mach-davinci/board-da850-evm.c#L1172
>
> Gilles.
>
> 2013/2/13 <geoff@thebakershome.net>
>
>> Hello,
>>
>>   I have been working with the gumstix board for a few months now with
>> the
>> goal of interfacing with a TVP514x series video input IC.
>>
>>   The IC is installed onto a board from econsystems:
>>
>> http://www.e-consystems.com/NTSC-PAL-Video-Decoder-Board-Gumstix.asp
>>
>>   I am working with yocto and the latest kernel within. I have a build
>> working now that has DSP support, TVP514x drivers in the kernel, and
>> this all tests well.
>>
>>   The next step is to enable the TVP514x device over I2C and setup the
>> V4L
>> interface. From what I have read it appears that media-ctl can
>> initialize this interface, so I added this to my recipie. However
>> media-ctl does not show the TVP device on its listing and gives errors
>> when I try to initialize.
>>
>>   My next thought is to perform some I2C debugging to ensure that the
>> device is talking. I tried this using u-boot but I am not certain of
>> what I should read from the IC.
>>
>>   Last night I started reading the code in board-overo.c and noticed
>> that
>> it initializes some devices (even over I2C), so I ask, do I need to
>> author support in board-overo.c for the TVP514x device, or is there
>> something else that I am missing?
>>
>>   Can anyone help by providing debug commands that I could use to work
>> through what is happening and what needs to be done next?
>>
>> Thank-you very much,
>> -Geoff
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Free Next-Gen Firewall Hardware Offer
>> Buy your Sophos next-gen firewall before the end March 2013
>> and get the hardware for free! Learn more.
>> http://p.sf.net/sfu/sophos-d2d-feb
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users