v4l: saa7134 module
- From: "Markus Rechberger" <mrechberger (at) gmail.com>
- Date: Wed, 7 Feb 2007 13:13:25 +0100
Hi Hartmut,
On 2/6/07, Hartmut Hackmann <hartmut.hackmann (at) t-online.de> wrote:
Hi, Markus
Markus Rechberger schrieb:
> History (Gerd Knorr: [patch] v4l: saa7134 module):
> http://lkml.org/lkml/2005/1/20/93
>
> There seems to be a general issue with loading submodules within a core
> module.
> It won't work until the core module exports its symbols.
> If sys_init_module would trigger a MODULE_STATE_LIVE at the end of
> loading the module modprobe would deadlock with holding a file lock on
> the core module.
> Attached approach tries to load the module asynchronosly with help of a
> workqueue.
>
> http://linuxtv.org/hg/~mrechberger/v4l-dvb-saa7134
>
> Markus
>
<snip>
>
Should i integrate your changes or will you ask Mauro to pull these?
Mauro should pull it as soon as someone Acked the patch.
Also: I sent you a mail some days ago, maybe to the wrong address.
Do you have any comments?
must have missed that mail..
I will insert it here:
Michael pointed me to to a repository of yours were you defined a GPIO
callback for the tuner module.
Looks like i did something very similar: Access the GPIOs of the SAA713x
in the tuner driver. the code is in
http://linuxtv.org/hg/~hhackmann/v4l-dvb
In the tuner struct, i declared a pointer to a function with the following
prototype:
void (*tuner_gpio_func_t) (void *dev, int bit_no, int value)
The parameters are:
void *dev : a pointer to the central device struct of the host
(saa713x, cx88 in your case.
this already is available in the i2c_client
->adapter->algo_data
int bit_no : the GPIO bit number to change
int value : how to set the port. currently i defined
0 : static 0
1 : static 1
3 : tristate (just by accident)
4 and 5: vsync on GPIO 22. This is a special case for the
tda8290
My current code assigns this pointer through as extended tuner_setup struct
via the TUNER_SET_TYPE_ADDR client call (together with an additional int.
I use the similar approach to fully switch the device to another mode,
not only to set up one gpio address.
int (*gpio_write)(enum v4l2_tuner_type type, void *gpio_priv, int ptr);
enum v4l2_tuner_type type : apropriate video input (DVB/analogue TV)
void *gpio_priv : a pointer for a private data
structure (the same as your void *dev)
int ptr : badly named, but it's an
identifier for doing different things currently values 0 and 1 are for
firmware uploads, it's like an ioctl command.
value 2 is for
reinitializing the dvb demod.
There are several gpio writes performed within 1 callback already
(mostly toggling a GPIO bit)
I'd say my approach is more flexible than your one, though we could
make it more generic probably by using (void *dev, int command, void
*arg)?
I had a glance at your code in
http://linuxtv.org/hg/~mrechberger/v4l-dvb-kernel
Your parameters are different, but the rest is similar. Can you please
explain a bit more what your parameters are good for?
It would be nice to find a common version of this.
done :)
cheers,
Markus
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list