From e568b608a89f187c88cbbff8149047e16754aec7 Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Thu, 23 Jul 2009 11:18:54 -0400 Subject: cx25840: Bugfix for no DVB-T on the Hauppauge HVR-1700 From: Steven Toth After the i2c subdev changes the ordering of initialization changed, causing a total loss of previous GPIO settings and a loss of DTV. The generic firmware loading routine has now changed to preserve GPIO values if the device is cx23885 based (safety) and I've moved the GPIO configuration from probe() into the cx23885 init func which is a little clearer and fixes the bug. Priority: normal Tested-By: Sohail Syyed Reviewed-by: Michael Krufky Signed-off-by: Steven Toth --- linux/drivers/media/video/cx25840/cx25840-core.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media/video/cx25840/cx25840-core.c') diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 2929bf3b7..557a3eaa1 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -341,6 +341,15 @@ static void cx23885_initialize(struct i2c_client *client) /* Select AFE clock pad output source */ cx25840_write(client, 0x144, 0x05); + /* Drive GPIO2 direction and values for HVR1700 + * where an onboard mux selects the output of demodulator + * vs the 417. Failure to set this results in no DTV. + * It's safe to set this across all Hauppauge boards + * currently, regardless of the board type. + */ + cx25840_write(client, 0x160, 0x1d); + cx25840_write(client, 0x164, 0x00); + /* Do the firmware load in a work handler to prevent. Otherwise the kernel is blocked waiting for the bit-banging i2c interface to finish uploading the @@ -1610,12 +1619,6 @@ static int cx25840_probe(struct i2c_client *client, state->id = id; state->rev = device_id; - if (state->is_cx23885) { - /* Drive GPIO2 direction and values */ - cx25840_write(client, 0x160, 0x1d); - cx25840_write(client, 0x164, 0x00); - } - return 0; } -- cgit v1.2.3