|
Hi! Has anyone met issues while managing video input to DC4 via
i2c? I have got camera, with board plugged into DC4. In order to manage
its settings I am required to change registers via i2c. How can I do that
properly? Do I have to isolate TVP5146 explicitly, when I plug my camera board
into DC4? Actually, I tried the following code because I supposed
that camera registers could be accessed using TVP5146 device address 0x56 on
i2c. But, I got ‘operation not permitted error code’ when used “i2c_smbus_write_word_data”
method, or ‘remote i\o error’ with “write” method. #include "i2c-dev.h" bool configureI2C() { int file; int adapter_nr = 0; char filename[20]; sprintf(filename,"/dev/i2c/%d",adapter_nr); if ((file = open(filename,O_RDWR)) < 0) { printf("\nError open i2c
device!"); return false; } int addr = 0x56; if (ioctl(file,I2C_SLAVE,addr) < 0) { printf("\nError set slave i2c device
address!"); return false; } __u8 reg = 0x177; __s32 res; int wtn = 0; if ( (wtn=i2c_smbus_write_word_data(file,reg,0x0000))
!= 3) { printf("\nError write 0x0000 to i2c
device! Returned %d, string: %s",wtn, strerror(errno)); return false; } So, I think, I am using wrong device address to manage my plugged
into DC4 camera registers. How can I get proper address of camera plugged into DC4 on
i2c? I would appreciate any help or advice on that issue. Thank you. Sincerely yours, Dmitry |
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
