aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-09-26 20:48:38 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 01:17:42 -0200
commit78bb6df6f2dd390a3480249187a055c385c0618a (patch)
treece743cfd341d415c19ae1298fbc4207ae58f4609
parenta6f6fb9c86aa202cbc04796efe9187b698b9b225 (diff)
downloadkernel_samsung_smdk4412-78bb6df6f2dd390a3480249187a055c385c0618a.zip
kernel_samsung_smdk4412-78bb6df6f2dd390a3480249187a055c385c0618a.tar.gz
kernel_samsung_smdk4412-78bb6df6f2dd390a3480249187a055c385c0618a.tar.bz2
[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>
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c5
-rw-r--r--drivers/media/video/cx231xx/cx231xx.h7
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 8e088db..28f77a7 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)
if (dev->board.tuner_gpio) {
cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1);
cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1);
+ }
+ if (dev->board.tuner_sif_gpio >= 0)
cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1);
- /* request some modules if any required */
- }
+ /* request some modules if any required */
/* set the mode to Analog mode initially */
cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index b4859a0..d079433 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -333,9 +333,10 @@ struct cx231xx_board {
struct cx231xx_reg_seq *dvb_gpio;
struct cx231xx_reg_seq *suspend_gpio;
struct cx231xx_reg_seq *tuner_gpio;
- u8 tuner_sif_gpio;
- u8 tuner_scl_gpio;
- u8 tuner_sda_gpio;
+ /* Negative means don't use it */
+ s8 tuner_sif_gpio;
+ s8 tuner_scl_gpio;
+ s8 tuner_sda_gpio;
/* PIN ctrl */
u32 ctl_pin_status_mask;