diff options
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 6 |
4 files changed, 18 insertions, 4 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index ac361858901a..135fd59a6b20 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -3038,7 +3038,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3038 | switch (dev->board) { | 3038 | switch (dev->board) { |
3039 | case SAA7134_BOARD_FLYVIDEO2000: | 3039 | case SAA7134_BOARD_FLYVIDEO2000: |
3040 | case SAA7134_BOARD_FLYVIDEO3000: | 3040 | case SAA7134_BOARD_FLYVIDEO3000: |
3041 | dev->has_remote = 1; | 3041 | dev->has_remote = SAA7134_REMOTE_GPIO; |
3042 | board_flyvideo(dev); | 3042 | board_flyvideo(dev); |
3043 | break; | 3043 | break; |
3044 | case SAA7134_BOARD_FLYTVPLATINUM_MINI2: | 3044 | case SAA7134_BOARD_FLYTVPLATINUM_MINI2: |
@@ -3068,7 +3068,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3068 | case SAA7134_BOARD_GOTVIEW_7135: | 3068 | case SAA7134_BOARD_GOTVIEW_7135: |
3069 | case SAA7134_BOARD_KWORLD_TERMINATOR: | 3069 | case SAA7134_BOARD_KWORLD_TERMINATOR: |
3070 | case SAA7134_BOARD_PCTV_CARDBUS: | 3070 | case SAA7134_BOARD_PCTV_CARDBUS: |
3071 | dev->has_remote = 1; | 3071 | dev->has_remote = SAA7134_REMOTE_GPIO; |
3072 | break; | 3072 | break; |
3073 | case SAA7134_BOARD_MD5044: | 3073 | case SAA7134_BOARD_MD5044: |
3074 | printk("%s: seems there are two different versions of the MD5044\n" | 3074 | printk("%s: seems there are two different versions of the MD5044\n" |
@@ -3108,6 +3108,11 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3108 | 3108 | ||
3109 | saa_writeb (SAA7134_PRODUCTION_TEST_MODE, 0x00); | 3109 | saa_writeb (SAA7134_PRODUCTION_TEST_MODE, 0x00); |
3110 | break; | 3110 | break; |
3111 | /* i2c remotes */ | ||
3112 | case SAA7134_BOARD_PINNACLE_PCTV_110i: | ||
3113 | case SAA7134_BOARD_UPMOST_PURPLE_TV: | ||
3114 | dev->has_remote = SAA7134_REMOTE_I2C; | ||
3115 | break; | ||
3111 | } | 3116 | } |
3112 | return 0; | 3117 | return 0; |
3113 | } | 3118 | } |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index afa0cfce6578..454b8a86c830 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -712,10 +712,12 @@ static int saa7134_hwinit2(struct saa7134_dev *dev) | |||
712 | SAA7134_IRQ2_INTE_PE | | 712 | SAA7134_IRQ2_INTE_PE | |
713 | SAA7134_IRQ2_INTE_AR; | 713 | SAA7134_IRQ2_INTE_AR; |
714 | 714 | ||
715 | if (dev->has_remote) | 715 | if (dev->has_remote == SAA7134_REMOTE_GPIO) |
716 | irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 | | 716 | irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 | |
717 | SAA7134_IRQ2_INTE_GPIO18A | | 717 | SAA7134_IRQ2_INTE_GPIO18A | |
718 | SAA7134_IRQ2_INTE_GPIO16 ); | 718 | SAA7134_IRQ2_INTE_GPIO16 ); |
719 | else if (dev->has_remote == SAA7134_REMOTE_I2C) | ||
720 | request_module("ir-kbd-i2c"); | ||
719 | 721 | ||
720 | saa_writel(SAA7134_IRQ1, 0); | 722 | saa_writel(SAA7134_IRQ1, 0); |
721 | saa_writel(SAA7134_IRQ2, irq2_mask); | 723 | saa_writel(SAA7134_IRQ2, irq2_mask); |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 2aba72de55d6..b792401712ba 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -716,7 +716,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
716 | int polling = 0; | 716 | int polling = 0; |
717 | int ir_type = IR_TYPE_OTHER; | 717 | int ir_type = IR_TYPE_OTHER; |
718 | 718 | ||
719 | if (!dev->has_remote) | 719 | if (dev->has_remote != SAA7134_REMOTE_GPIO) |
720 | return -ENODEV; | 720 | return -ENODEV; |
721 | if (disable_ir) | 721 | if (disable_ir) |
722 | return -ENODEV; | 722 | return -ENODEV; |
@@ -877,6 +877,7 @@ void saa7134_input_fini(struct saa7134_dev *dev) | |||
877 | void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir) | 877 | void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir) |
878 | { | 878 | { |
879 | if (disable_ir) { | 879 | if (disable_ir) { |
880 | dprintk("Found supported i2c remote, but IR has been disabled\n"); | ||
880 | ir->get_key=NULL; | 881 | ir->get_key=NULL; |
881 | return; | 882 | return; |
882 | } | 883 | } |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index a82468a07676..14a83b82ab23 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -213,6 +213,12 @@ struct saa7134_format { | |||
213 | #define SAA7134_INPUT_MAX 8 | 213 | #define SAA7134_INPUT_MAX 8 |
214 | 214 | ||
215 | /* ----------------------------------------------------------- */ | 215 | /* ----------------------------------------------------------- */ |
216 | /* Since we support 2 remote types, lets tell them apart */ | ||
217 | |||
218 | #define SAA7134_REMOTE_GPIO 1 | ||
219 | #define SAA7134_REMOTE_I2C 2 | ||
220 | |||
221 | /* ----------------------------------------------------------- */ | ||
216 | /* Video Output Port Register Initialization Options */ | 222 | /* Video Output Port Register Initialization Options */ |
217 | 223 | ||
218 | #define SET_T_CODE_POLARITY_NON_INVERTED (1 << 0) | 224 | #define SET_T_CODE_POLARITY_NON_INVERTED (1 << 0) |