diff options
author | Antti Palosaari <crope@iki.fi> | 2011-04-07 15:04:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:30:08 -0400 |
commit | bc022694d7da1c848e395f18eaf856abc9dd0b09 (patch) | |
tree | 158b5b18c0ab8e4ad24c6122947bb274169a52b7 /drivers/media | |
parent | f71095be6645aee0828623701e35e7e7d52910d8 (diff) |
[media] em28xx: add support for EM28174 chip
EM28174 is very similar as already supported EM2874.
I am not sure what are differences, but it could be analog support.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 5 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-reg.h | 1 |
4 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index bdd8618dad36..9a5ac562ee33 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -2810,6 +2810,11 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
2810 | dev->reg_gpio_num = EM2874_R80_GPIO; | 2810 | dev->reg_gpio_num = EM2874_R80_GPIO; |
2811 | dev->wait_after_write = 0; | 2811 | dev->wait_after_write = 0; |
2812 | break; | 2812 | break; |
2813 | case CHIP_ID_EM28174: | ||
2814 | em28xx_info("chip ID is em28174\n"); | ||
2815 | dev->reg_gpio_num = EM2874_R80_GPIO; | ||
2816 | dev->wait_after_write = 0; | ||
2817 | break; | ||
2813 | case CHIP_ID_EM2883: | 2818 | case CHIP_ID_EM2883: |
2814 | em28xx_info("chip ID is em2882/em2883\n"); | 2819 | em28xx_info("chip ID is em2882/em2883\n"); |
2815 | dev->wait_after_write = 0; | 2820 | dev->wait_after_write = 0; |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 44c63cbd6dda..92b6dd84f1f6 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -614,7 +614,7 @@ int em28xx_capture_start(struct em28xx *dev, int start) | |||
614 | { | 614 | { |
615 | int rc; | 615 | int rc; |
616 | 616 | ||
617 | if (dev->chip_id == CHIP_ID_EM2874) { | 617 | if (dev->chip_id == CHIP_ID_EM2874 || dev->chip_id == CHIP_ID_EM28174) { |
618 | /* The Transport Stream Enable Register moved in em2874 */ | 618 | /* The Transport Stream Enable Register moved in em2874 */ |
619 | if (!start) { | 619 | if (!start) { |
620 | rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, | 620 | rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, |
@@ -1111,6 +1111,10 @@ int em28xx_isoc_dvb_max_packetsize(struct em28xx *dev) | |||
1111 | /* FIXME - for now assume 564 like it was before, but the | 1111 | /* FIXME - for now assume 564 like it was before, but the |
1112 | em2874 code should be added to return the proper value... */ | 1112 | em2874 code should be added to return the proper value... */ |
1113 | packet_size = 564; | 1113 | packet_size = 564; |
1114 | } else if (dev->chip_id == CHIP_ID_EM28174) { | ||
1115 | /* FIXME same as em2874. 564 was enough for 22 Mbit DVB-T | ||
1116 | but too much for 44 Mbit DVB-C. */ | ||
1117 | packet_size = 752; | ||
1114 | } else { | 1118 | } else { |
1115 | /* TS max packet size stored in bits 1-0 of R01 */ | 1119 | /* TS max packet size stored in bits 1-0 of R01 */ |
1116 | chip_cfg2 = em28xx_read_reg(dev, EM28XX_R01_CHIPCFG2); | 1120 | chip_cfg2 = em28xx_read_reg(dev, EM28XX_R01_CHIPCFG2); |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 71474d31e155..4739fc7e6eb3 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -332,7 +332,7 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len) | |||
332 | struct em28xx_eeprom *em_eeprom = (void *)eedata; | 332 | struct em28xx_eeprom *em_eeprom = (void *)eedata; |
333 | int i, err, size = len, block; | 333 | int i, err, size = len, block; |
334 | 334 | ||
335 | if (dev->chip_id == CHIP_ID_EM2874) { | 335 | if (dev->chip_id == CHIP_ID_EM2874 || dev->chip_id == CHIP_ID_EM28174) { |
336 | /* Empia switched to a 16-bit addressable eeprom in newer | 336 | /* Empia switched to a 16-bit addressable eeprom in newer |
337 | devices. While we could certainly write a routine to read | 337 | devices. While we could certainly write a routine to read |
338 | the eeprom, there is nothing of use in there that cannot be | 338 | the eeprom, there is nothing of use in there that cannot be |
diff --git a/drivers/media/video/em28xx/em28xx-reg.h b/drivers/media/video/em28xx/em28xx-reg.h index 91e90559642b..e92a28ede434 100644 --- a/drivers/media/video/em28xx/em28xx-reg.h +++ b/drivers/media/video/em28xx/em28xx-reg.h | |||
@@ -201,6 +201,7 @@ enum em28xx_chip_id { | |||
201 | CHIP_ID_EM2870 = 35, | 201 | CHIP_ID_EM2870 = 35, |
202 | CHIP_ID_EM2883 = 36, | 202 | CHIP_ID_EM2883 = 36, |
203 | CHIP_ID_EM2874 = 65, | 203 | CHIP_ID_EM2874 = 65, |
204 | CHIP_ID_EM28174 = 113, | ||
204 | }; | 205 | }; |
205 | 206 | ||
206 | /* | 207 | /* |