--- i2c.c 2009-05-29 00:33:46.000000000 +0700 +++ /home/dottedmag/i2c.c 2009-09-11 22:09:06.000000000 +0700 @@ -135,17 +135,22 @@ int cnt = count; int timeout = 5; +// printk(KERN_ERR "Read I2C: %d\n", (int)buf[0]); + L_try_again: if (timeout < 0) goto L_timeout; __i2c_send_nack(); /* Master does not send ACK, slave sends it */ + +#ifndef CONFIG_KEYBOARD_EREADER_JZ __i2c_send_start(); if (i2c_put_data( (device << 1) | I2C_WRITE ) < 0) goto device_werr; if (i2c_put_data(address) < 0) goto address_err; +#endif __i2c_send_start(); if (i2c_put_data( (device << 1) | I2C_READ ) < 0) @@ -204,8 +211,10 @@ goto device_err; #ifdef CONFIG_JZ_TPANEL_ATA2508 if (address == 0xff) { +#ifndef CONFIG_KEYBOARD_EREADER_JZ if (i2c_put_data_nack(tmpaddr) < 0) goto address_err; +#endif while (cnt) { if (++cnt_in_pg > 8) { __i2c_send_stop(); @@ -220,9 +229,10 @@ } } else { - +#ifndef CONFIG_KEYBOARD_EREADER_JZ if (i2c_put_data(tmpaddr) < 0) goto address_err; +#endif while (cnt) { if (++cnt_in_pg > 8) { __i2c_send_stop(); @@ -237,8 +247,10 @@ } } #else +#ifndef CONFIG_KEYBOARD_EREADER_JZ if (i2c_put_data(tmpaddr) < 0) goto address_err; +#endif while (cnt) { if (++cnt_in_pg > 8) { __i2c_send_stop();