diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 20:42:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:42 -0400 |
commit | 89b329ef9d7cc16ed46fc991b21b2d45e7bf452c (patch) | |
tree | 1cd9ce2b15423282d50e6a96ed5ff789030e7cdf /drivers/media/video/em28xx/em28xx-cards.c | |
parent | 7640ea99339c687864f6131598e2eee2ca73cb9c (diff) |
V4L/DVB (7610): em28xx: Select reg wait time based on chip ID
This is more conservative than just removing the msleep() from
em28xx_write_regs_req(), since some old hardware may still need it.
So, it will remove the sleep time only for those chips where this
removal were tested.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 7dfea3ac9b2f..0c71e599c140 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -525,6 +525,20 @@ static void em28xx_set_model(struct em28xx *dev) | |||
525 | */ | 525 | */ |
526 | void em28xx_pre_card_setup(struct em28xx *dev) | 526 | void em28xx_pre_card_setup(struct em28xx *dev) |
527 | { | 527 | { |
528 | int rc; | ||
529 | |||
530 | dev->wait_after_write = 5; | ||
531 | rc = em28xx_read_reg(dev, CHIPID_REG); | ||
532 | if (rc > 0) { | ||
533 | switch (rc) { | ||
534 | case 36: | ||
535 | em28xx_info("chip ID is em2882/em2883\n"); | ||
536 | dev->wait_after_write = 0; | ||
537 | break; | ||
538 | default: | ||
539 | em28xx_info("em28xx chip ID = %d\n", rc); | ||
540 | } | ||
541 | } | ||
528 | em28xx_set_model(dev); | 542 | em28xx_set_model(dev); |
529 | 543 | ||
530 | /* request some modules */ | 544 | /* request some modules */ |