All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	video4linux list <video4linux-list@redhat.com>,
	dvb list <linux-dvb@linuxtv.org>
Subject: [patch 2/2] dvb: cx22702 frontend driver update
Date: Wed, 27 Apr 2005 16:12:36 +0200	[thread overview]
Message-ID: <20050427141236.GA15034@bytesex> (raw)

update cx22702 fe driver, add support for using the dvb pll lib,
enable cx22702 support in cx88-dvb.

Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
---
 drivers/media/dvb/frontends/cx22702.c     |   15 
 drivers/media/dvb/frontends/cx22702.h     |    3 
 drivers/media/video/Kconfig               |    1 
 drivers/media/video/cx88/cx88-dvb.c       |    2 
 5 files changed, 662 insertions(+), 2 deletions(-)

Index: linux-2.6.12-rc3/drivers/media/dvb/frontends/cx22702.h
===================================================================
--- linux-2.6.12-rc3.orig/drivers/media/dvb/frontends/cx22702.h	2005-04-27 15:13:06.000000000 +0200
+++ linux-2.6.12-rc3/drivers/media/dvb/frontends/cx22702.h	2005-04-27 15:13:10.000000000 +0200
@@ -36,6 +36,9 @@ struct cx22702_config
 	u8 demod_address;
 
 	/* PLL maintenance */
+	u8 pll_address;
+	struct dvb_pll_desc *pll_desc;
+
 	int (*pll_init)(struct dvb_frontend* fe);
 	int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
 };
Index: linux-2.6.12-rc3/drivers/media/video/Kconfig
===================================================================
--- linux-2.6.12-rc3.orig/drivers/media/video/Kconfig	2005-04-27 15:13:06.000000000 +0200
+++ linux-2.6.12-rc3/drivers/media/video/Kconfig	2005-04-27 15:13:10.000000000 +0200
@@ -252,6 +252,7 @@ config VIDEO_SAA7134_DVB
 	depends on VIDEO_SAA7134 && DVB_CORE
 	select VIDEO_BUF_DVB
 	select DVB_MT352
+	select DVB_CX22702
 	---help---
 	  This adds support for DVB cards based on the
 	  Philips saa7134 chip.
Index: linux-2.6.12-rc3/drivers/media/video/cx88/cx88-dvb.c
===================================================================
--- linux-2.6.12-rc3.orig/drivers/media/video/cx88/cx88-dvb.c	2005-04-27 15:13:06.000000000 +0200
+++ linux-2.6.12-rc3/drivers/media/video/cx88/cx88-dvb.c	2005-04-27 15:13:10.000000000 +0200
@@ -31,7 +31,7 @@
 #include <linux/suspend.h>
 
 /* those two frontends need merging via linuxtv cvs ... */
-#define HAVE_CX22702 0
+#define HAVE_CX22702 1
 #define HAVE_OR51132 1
 
 #include "cx88.h"
Index: linux-2.6.12-rc3/drivers/media/dvb/frontends/cx22702.c
===================================================================
--- linux-2.6.12-rc3.orig/drivers/media/dvb/frontends/cx22702.c	2005-04-27 15:13:06.000000000 +0200
+++ linux-2.6.12-rc3/drivers/media/dvb/frontends/cx22702.c	2005-04-27 15:14:30.000000000 +0200
@@ -32,6 +32,7 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include "dvb_frontend.h"
+#include "dvb-pll.h"
 #include "cx22702.h"
 
 
@@ -203,7 +204,19 @@ static int cx22702_set_tps (struct dvb_f
 
 	/* set PLL */
         cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) &0xfe);
-	state->config->pll_set(fe, p);
+	if (state->config->pll_set) {
+		state->config->pll_set(fe, p);
+	} else if (state->config->pll_desc) {
+		u8 pllbuf[4];
+		struct i2c_msg msg = { .addr = state->config->pll_address,
+				       .buf = pllbuf, .len = 4 };
+		dvb_pll_configure(state->config->pll_desc, pllbuf,
+				  p->frequency,
+				  p->u.ofdm.bandwidth);
+		i2c_transfer(state->i2c, &msg, 1);
+	} else {
+		BUG();
+	}
         cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) | 1);
 
 	/* set inversion */

-- 
#define printk(args...) fprintf(stderr, ## args)

                 reply	other threads:[~2005-04-27 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050427141236.GA15034@bytesex \
    --to=kraxel@bytesex.org \
    --cc=akpm@osdl.org \
    --cc=linux-dvb@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.