From: Hans Verkuil Date: Tue, 20 May 2008 01:13:02 +0000 (-0300) Subject: V4L/DVB (7925): cx18: ensure that the xceive pin is always asserted on init. X-Git-Tag: v2.6.26-rc6~96^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f3917f6484938d56cb5ab660f476c1dfa445a81;p=linux-2.6 V4L/DVB (7925): cx18: ensure that the xceive pin is always asserted on init. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/video/cx18/cx18-gpio.c index bb8bc86086..1e0d32b992 100644 --- a/drivers/media/video/cx18/cx18-gpio.c +++ b/drivers/media/video/cx18/cx18-gpio.c @@ -62,12 +62,14 @@ void cx18_gpio_init(struct cx18 *cx) gpio_dir = cx->card->gpio_init.direction; gpio_val = cx->card->gpio_init.initial_value; + if (cx->card->xceive_pin) { + gpio_dir |= 1 << cx->card->xceive_pin; + gpio_val |= 1 << cx->card->xceive_pin; + } + if (gpio_dir == 0) return; - gpio_dir |= 1 << cx->card->xceive_pin; - gpio_val |= 1 << cx->card->xceive_pin; - CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n", read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2), read_reg(CX18_REG_GPIO_OUT1), read_reg(CX18_REG_GPIO_OUT2));