Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17322
b: refs/heads/master
c: 210e207
h: refs/heads/master
v: v3
  • Loading branch information
Tyler Trafford authored and Mauro Carvalho Chehab committed Jan 9, 2006
1 parent 486a8cf commit ae743b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83ac8722be6d34b9bbcaabfff825d5847ce3a9d4
refs/heads/master: 210e207c1d98348f5993e6f580cd20cf20086d7d
13 changes: 11 additions & 2 deletions trunk/drivers/media/video/cx25840/cx25840-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/


#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
Expand Down Expand Up @@ -94,13 +93,23 @@ static inline int check_fw_load(struct i2c_client *client, int size)

static inline int fw_write(struct i2c_client *client, u8 * data, int size)
{
if (i2c_master_send(client, data, size) < size) {
int sent;

if ((sent = i2c_master_send(client, data, size)) < size) {

if (fastfw) {
cx25840_err("333MHz i2c firmware load failed\n");
fastfw = 0;
set_i2c_delay(client, 10);

if (sent > 2) {
u16 dl_addr = cx25840_read(client, 0x801) << 8;
dl_addr |= cx25840_read(client, 0x800);
dl_addr -= sent - 2;
cx25840_write(client, 0x801, dl_addr >> 8);
cx25840_write(client, 0x800, dl_addr & 0xff);
}

if (i2c_master_send(client, data, size) < size) {
cx25840_err
("100MHz i2c firmware load failed\n");
Expand Down

0 comments on commit ae743b2

Please sign in to comment.