diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-09-26 19:48:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:17:42 -0400 |
commit | 78bb6df6f2dd390a3480249187a055c385c0618a (patch) | |
tree | ce743cfd341d415c19ae1298fbc4207ae58f4609 /drivers/media/video/cx231xx | |
parent | a6f6fb9c86aa202cbc04796efe9187b698b9b225 (diff) |
[media] cx231xx: Only change gpio direction when needed
Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 5 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx.h | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 8e088db1a56..28f77a7f657 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -495,10 +495,11 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) | |||
495 | if (dev->board.tuner_gpio) { | 495 | if (dev->board.tuner_gpio) { |
496 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); | 496 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); |
497 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); | 497 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); |
498 | } | ||
499 | if (dev->board.tuner_sif_gpio >= 0) | ||
498 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); | 500 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); |
499 | 501 | ||
500 | /* request some modules if any required */ | 502 | /* request some modules if any required */ |
501 | } | ||
502 | 503 | ||
503 | /* set the mode to Analog mode initially */ | 504 | /* set the mode to Analog mode initially */ |
504 | cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); | 505 | cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); |
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h index b4859a0afd8..d0794332114 100644 --- a/drivers/media/video/cx231xx/cx231xx.h +++ b/drivers/media/video/cx231xx/cx231xx.h | |||
@@ -333,9 +333,10 @@ struct cx231xx_board { | |||
333 | struct cx231xx_reg_seq *dvb_gpio; | 333 | struct cx231xx_reg_seq *dvb_gpio; |
334 | struct cx231xx_reg_seq *suspend_gpio; | 334 | struct cx231xx_reg_seq *suspend_gpio; |
335 | struct cx231xx_reg_seq *tuner_gpio; | 335 | struct cx231xx_reg_seq *tuner_gpio; |
336 | u8 tuner_sif_gpio; | 336 | /* Negative means don't use it */ |
337 | u8 tuner_scl_gpio; | 337 | s8 tuner_sif_gpio; |
338 | u8 tuner_sda_gpio; | 338 | s8 tuner_scl_gpio; |
339 | s8 tuner_sda_gpio; | ||
339 | 340 | ||
340 | /* PIN ctrl */ | 341 | /* PIN ctrl */ |
341 | u32 ctl_pin_status_mask; | 342 | u32 ctl_pin_status_mask; |