Skip to content

Commit

Permalink
[media] cx231xx: Only change gpio direction when needed
Browse files Browse the repository at this point in the history
Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 21, 2010
1 parent a6f6fb9 commit 78bb6df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions drivers/media/video/cx231xx/cx231xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions drivers/media/video/cx231xx/cx231xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78bb6df

Please sign in to comment.