summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorRicardo Cerqueira <devnull@localhost>2005-11-05 02:49:20 +0000
committerRicardo Cerqueira <devnull@localhost>2005-11-05 02:49:20 +0000
commit01bae253fab811e0e8938576d483a7773a97a7d1 (patch)
tree8a2cc6e193880f075193a00c29924f40f50715d1 /linux
parenta94efc083924c335223beb5d03860b06714b0c98 (diff)
downloadmediapointer-dvb-s2-01bae253fab811e0e8938576d483a7773a97a7d1.tar.gz
mediapointer-dvb-s2-01bae253fab811e0e8938576d483a7773a97a7d1.tar.bz2
- SAA713x cards with i2c remotes now autoload ir-kbd-i2c
(disable_ir works, as it does for GPIO remotes) Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c11
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c5
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h8
4 files changed, 22 insertions, 8 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index 079132c5a..b2ae80a2e 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.112 2005/11/03 23:51:58 hhackmann Exp $
+ * $Id: saa7134-cards.c,v 1.113 2005/11/05 02:49:20 rmcc Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -3077,7 +3077,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
switch (dev->board) {
case SAA7134_BOARD_FLYVIDEO2000:
case SAA7134_BOARD_FLYVIDEO3000:
- dev->has_remote = 1;
+ dev->has_remote = SAA7134_REMOTE_GPIO;
board_flyvideo(dev);
break;
case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
@@ -3107,7 +3107,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_GOTVIEW_7135:
case SAA7134_BOARD_KWORLD_TERMINATOR:
case SAA7134_BOARD_PCTV_CARDBUS:
- dev->has_remote = 1;
+ dev->has_remote = SAA7134_REMOTE_GPIO;
break;
case SAA7134_BOARD_MD5044:
printk("%s: seems there are two different versions of the MD5044\n"
@@ -3147,6 +3147,11 @@ int saa7134_board_init1(struct saa7134_dev *dev)
saa_writeb (SAA7134_PRODUCTION_TEST_MODE, 0x00);
break;
+ /* i2c remotes */
+ case SAA7134_BOARD_PINNACLE_PCTV_110i:
+ case SAA7134_BOARD_UPMOST_PURPLE_TV:
+ dev->has_remote = SAA7134_REMOTE_I2C;
+ break;
}
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index b61799153..c5664af9e 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-core.c,v 1.46 2005/10/16 12:13:58 mchehab Exp $
+ * $Id: saa7134-core.c,v 1.47 2005/11/05 02:49:20 rmcc Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -782,10 +782,12 @@ static int saa7134_hwinit2(struct saa7134_dev *dev)
SAA7134_IRQ2_INTE_PE |
SAA7134_IRQ2_INTE_AR;
- if (dev->has_remote)
+ if (dev->has_remote == SAA7134_REMOTE_GPIO)
irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 |
SAA7134_IRQ2_INTE_GPIO18A |
SAA7134_IRQ2_INTE_GPIO16 );
+ else if (dev->has_remote == SAA7134_REMOTE_I2C)
+ request_module("ir-kbd-i2c");
saa_writel(SAA7134_IRQ1, 0);
saa_writel(SAA7134_IRQ2, irq2_mask);
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index c2d214eb2..cacb8eb73 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-input.c,v 1.38 2005/11/03 20:00:36 nsh Exp $
+ * $Id: saa7134-input.c,v 1.39 2005/11/05 02:49:20 rmcc Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
@@ -728,7 +728,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
int polling = 0;
int ir_type = IR_TYPE_OTHER;
- if (!dev->has_remote)
+ if (dev->has_remote != SAA7134_REMOTE_GPIO)
return -ENODEV;
if (disable_ir)
return -ENODEV;
@@ -889,6 +889,7 @@ void saa7134_input_fini(struct saa7134_dev *dev)
void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir)
{
if (disable_ir) {
+ dprintk("Found supported i2c remote, but IR has been disabled\n");
ir->get_key=NULL;
return;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 2ad869a2b..efcd7a213 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134.h,v 1.75 2005/11/02 21:43:50 hhackmann Exp $
+ * $Id: saa7134.h,v 1.76 2005/11/05 02:49:20 rmcc Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -220,6 +220,12 @@ struct saa7134_format {
#define SAA7134_INPUT_MAX 8
/* ----------------------------------------------------------- */
+/* Since we support 2 remote types, lets tell them apart */
+
+#define SAA7134_REMOTE_GPIO 1
+#define SAA7134_REMOTE_I2C 2
+
+/* ----------------------------------------------------------- */
/* Video Output Port Register Initialization Options */
#define SET_T_CODE_POLARITY_NON_INVERTED (1 << 0)