diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-30 20:10:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-30 20:10:43 -0300 |
commit | 9a373df780905ef4e981bae11edccba07d94e305 (patch) | |
tree | 5339c90619daa9375c5ca37023b40eea1a8f932e /linux/drivers/media/video/cx25840/cx25840-firmware.c | |
parent | 49baec9371209e4c77da0321f577b9a33be0fe48 (diff) | |
parent | 74171fb0a60787bfd13f6a4a98450f0f5ed4d0dc (diff) | |
download | mediapointer-dvb-s2-9a373df780905ef4e981bae11edccba07d94e305.tar.gz mediapointer-dvb-s2-9a373df780905ef4e981bae11edccba07d94e305.tar.bz2 |
merge: http://kernellabs.com/hg/~mkrufky/cx23885
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-firmware.c')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-firmware.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c index f01456ec4..bdc630f0f 100644 --- a/linux/drivers/media/video/cx25840/cx25840-firmware.c +++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c @@ -99,9 +99,14 @@ int cx25840_loadfw(struct i2c_client *client) const u8 *ptr; int size, retval; int MAX_BUF_SIZE = FWSEND; + u32 gpio_oe = 0, gpio_da = 0; - if (state->is_cx23885) + if (state->is_cx23885) { firmware = FWFILE_CX23885; + /* Preserve the GPIO OE and output bits */ + gpio_oe = cx25840_read(client, 0x160); + gpio_da = cx25840_read(client, 0x164); + } else if (state->is_cx231xx) firmware = FWFILE_CX231XX; @@ -143,5 +148,11 @@ int cx25840_loadfw(struct i2c_client *client) size = fw->size; release_firmware(fw); + if (state->is_cx23885) { + /* Restore GPIO configuration after f/w load */ + cx25840_write(client, 0x160, gpio_oe); + cx25840_write(client, 0x164, gpio_da); + } + return check_fw_load(client, size); } |