From: Mauro Carvalho Chehab Date: Sun, 26 Sep 2010 23:48:38 +0000 (-0300) Subject: [media] cx231xx: Only change gpio direction when needed X-Git-Tag: firefly_0821_release~7613^2~3587^2~262 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=78bb6df6f2dd390a3480249187a055c385c0618a;p=firefly-linux-kernel-4.4.55.git [media] cx231xx: Only change gpio direction when needed Acked-by: Sri Deevi Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 8e088db1a568..28f77a7f6572 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 b4859a0afd8c..d0794332114c 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;