diff options
author | Steven Toth <stoth@kernellabs.com> | 2009-07-23 11:18:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:18:15 -0400 |
commit | f3d6f63302bfcd7462d46bd1fe44146c971634d4 (patch) | |
tree | 29f261a29f5ea467e5ca13354d866084f99be55e /drivers/media/video/cx25840/cx25840-core.c | |
parent | 73c6f462d1d07f276e279467f311a96a2a43d9c5 (diff) |
V4L/DVB (12347): cx25840: Bugfix for no DVB-T on the Hauppauge HVR-1700
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.
Tested-by: Sohail Syyed <linuxtv@hubstar.net>
Reviewed-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 0be51b65f098..1aeaf18a9bea 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -321,6 +321,15 @@ static void cx23885_initialize(struct i2c_client *client) | |||
321 | /* Select AFE clock pad output source */ | 321 | /* Select AFE clock pad output source */ |
322 | cx25840_write(client, 0x144, 0x05); | 322 | cx25840_write(client, 0x144, 0x05); |
323 | 323 | ||
324 | /* Drive GPIO2 direction and values for HVR1700 | ||
325 | * where an onboard mux selects the output of demodulator | ||
326 | * vs the 417. Failure to set this results in no DTV. | ||
327 | * It's safe to set this across all Hauppauge boards | ||
328 | * currently, regardless of the board type. | ||
329 | */ | ||
330 | cx25840_write(client, 0x160, 0x1d); | ||
331 | cx25840_write(client, 0x164, 0x00); | ||
332 | |||
324 | /* Do the firmware load in a work handler to prevent. | 333 | /* Do the firmware load in a work handler to prevent. |
325 | Otherwise the kernel is blocked waiting for the | 334 | Otherwise the kernel is blocked waiting for the |
326 | bit-banging i2c interface to finish uploading the | 335 | bit-banging i2c interface to finish uploading the |
@@ -1578,12 +1587,6 @@ static int cx25840_probe(struct i2c_client *client, | |||
1578 | state->id = id; | 1587 | state->id = id; |
1579 | state->rev = device_id; | 1588 | state->rev = device_id; |
1580 | 1589 | ||
1581 | if (state->is_cx23885) { | ||
1582 | /* Drive GPIO2 direction and values */ | ||
1583 | cx25840_write(client, 0x160, 0x1d); | ||
1584 | cx25840_write(client, 0x164, 0x00); | ||
1585 | } | ||
1586 | |||
1587 | return 0; | 1590 | return 0; |
1588 | } | 1591 | } |
1589 | 1592 | ||