mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 7/7] adding common used headers
@ 2008-10-22 21:13 Markus Rechberger
  2008-10-24 17:38 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Rechberger @ 2008-10-22 21:13 UTC (permalink / raw)
  To: Linux Kernel Mailing List, em28xx
  Cc: acano, Andre Kelmanson, Bouwsma Barry, Dan Kreiser, Frank Neuber,
	Jelle de Jong, John Stowers, Lukas Kuna, Stefan Vonolfen,
	Stephan Berberig, Thomas Giesecke, Vitaly Wool, Zhenyu Wang

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

    adding common used headers

    tunerchip.h:
    just contains an internal used struct which can be used for
setting up a tuner frontend.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: em28xx-07.diff --]
[-- Type: text/x-diff; name=em28xx-07.diff, Size: 1864 bytes --]

commit f67a44d14a847e3fcc4fd74d1660666535c26905
Author: Markus Rechberger <mrechberger@sundtek.de>
Date:   Wed Oct 22 22:14:17 2008 +0200

    adding common used headers
    
    tunerchip.h:
    just contains an internal used struct which can be used for setting up a tuner frontend.

Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>

diff --git a/drivers/media/video/empia/include/tunerchip.h b/drivers/media/video/empia/include/tunerchip.h
new file mode 100644
index 0000000..75ba8e6
--- /dev/null
+++ b/drivers/media/video/empia/include/tunerchip.h
@@ -0,0 +1,32 @@
+#ifndef _TUNER_CHIP_H
+#define _TUNER_CHIP_H
+
+struct tuner_module {
+	void *priv;
+        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
+        int (*shutdown)(struct tuner_module *client);
+        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
+        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
+        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
+        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
+        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
+	void (*release)(struct tuner_module *client);
+};
+
+#define tuner_chip_detach(MOD) if(MOD) { \
+				MOD->release(MOD); \
+				symbol_put_addr(MOD->release); \
+			       }
+
+#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
+	struct tuner_module *mod = NULL; \
+	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+	if (__a) {  \
+		mod=__a(ARGS); \
+		if (mod == 0) \
+			symbol_put(__a); \
+	} \
+	mod; \
+})
+
+#endif

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

* Re: [PATCH 7/7] adding common used headers
  2008-10-22 21:13 [PATCH 7/7] adding common used headers Markus Rechberger
@ 2008-10-24 17:38 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2008-10-24 17:38 UTC (permalink / raw)
  To: Markus Rechberger
  Cc: Linux Kernel Mailing List, em28xx, acano, Andre Kelmanson,
	Bouwsma Barry, Dan Kreiser, Frank Neuber, Jelle de Jong,
	John Stowers, Lukas Kuna, Stefan Vonolfen, Stephan Berberig,
	Thomas Giesecke, Vitaly Wool, Zhenyu Wang

On Wed, 22 Oct 2008 23:13:20 +0200
"Markus Rechberger" <mrechberger@gmail.com> wrote:

>     adding common used headers
> 
>     tunerchip.h:
>     just contains an internal used struct which can be used for
> setting up a tuner frontend.

NACK.

This seems to be some binding for your em28xx. It is currently not needed.

Cheers,
Mauro

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

* [PATCH 7/7] adding common used headers
@ 2008-10-22 21:11 Markus Rechberger
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Rechberger @ 2008-10-22 21:11 UTC (permalink / raw)
  To: Linux Kernel Mailing List, em28xx
  Cc: acano, Andre Kelmanson, Bouwsma Barry, Dan Kreiser, Frank Neuber,
	Jelle de Jong, John Stowers, Lukas Kuna, Stefan Vonolfen,
	Stephan Berberig, Thomas Giesecke, Vitaly Wool, Zhenyu Wang

    tunerchip.h:
    just contains an internal used struct which can be used for
setting up a tuner frontend.

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

end of thread, other threads:[~2008-10-24 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 21:13 [PATCH 7/7] adding common used headers Markus Rechberger
2008-10-24 17:38 ` Mauro Carvalho Chehab
  -- strict thread matches above, loose matches on Subject: below --
2008-10-22 21:11 Markus Rechberger

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

all inboxes | Powered by JetHome®