public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: PxDVR3200 H LinuxTV v4l-dvb patch : Pull GPIO-20 low for DVB-T
@ 2009-06-23 12:33 Hans Verkuil
  2009-06-23 13:10 ` Terry Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Hans Verkuil @ 2009-06-23 12:33 UTC (permalink / raw)
  To: Andy Walls; +Cc: linux-media, stoth, Terry Wu


> On Tue, 2009-06-23 at 11:39 +0800, Terry Wu wrote:
>> Hi,
>>
>>     I add the following codes in the cx23885_initialize() of
>> cx25840-core.c:
>> 	/* Drive GPIO2 (GPIO 19~23) direction and values for DVB-T */
>> 	cx25840_and_or(client, 0x160, 0x1d, 0x00);
>> 	cx25840_write(client, 0x164, 0x00);
>>
>>     Before that, the tuning status is 0x1e, but <0> service found.
>>     Now, I can watch DVB-T (Taiwan, 6MHz bandwidth).
>>
>>     And if you are living in Australia, you should update the
>> tuner-xc2028.c too:
>>     http://tw1965.myweb.hinet.net/Linux/v4l-dvb/20090611-TDA18271HDC2/tuner-xc2028.c
>>
>> Best Regards,
>> Terry
>
>
> Hans,
>
> As I think of potential ways to handle this, I thought we may need to
> add a v4l2_subdev interface for setting and reading GPIO's.

There is already an s_gpio in the core ops. It would be simple to add a
g_gpio as well if needed.

It is not a good idea to directly control GPIO pins from within a subdev
driver for the simple reason that the subdev driver has no idea how its
gpio pins are hooked up. This should really be done from the v4l driver
itself. If you need a notification from the subdev that the v4l driver
needs to take some action, then the subdev can send a notification through
the notify function in v4l2_device. That's currently used by one subdev
driver that requires that the v4l driver toggles a GPIO pin at the right
time.

Regards,

          Hans

> A CX23418 based board has a Winbond W8360x GPIO IC connected via I2C.
> When I get to writing a v4l2_subdevice driver for that, it will need
> such an internal interface as well.
>
> Thoughts?
>
> Regards,
> Andy
>
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-06-29 13:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 12:33 PxDVR3200 H LinuxTV v4l-dvb patch : Pull GPIO-20 low for DVB-T Hans Verkuil
2009-06-23 13:10 ` Terry Wu
2009-06-23 21:53   ` Andy Walls
2009-06-23 21:50 ` Andy Walls
2009-06-25  2:40 ` v4l2_subdev GPIO and Pin Control ops (Re: PxDVR3200 H LinuxTV v4l-dvb patch : Pull GPIO-20 low for DVB-T) Andy Walls
2009-06-25  6:39   ` Hans Verkuil
2009-06-25 11:15     ` Andy Walls
2009-06-26 14:37       ` Steven Toth
2009-06-26 16:12         ` Andy Walls
2009-06-26 16:25           ` Steven Toth
2009-06-26 18:11             ` Andy Walls
2009-06-26 18:19             ` Andy Walls
2009-06-29 13:47               ` Steven Toth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox