AnsweredAssumed Answered

adau1761 configuration, linux, i2c

Question asked by tito on Jun 9, 2014
Latest reply on Jun 9, 2014 by larsc



i try to configure the adau1761 via i2c. First step was to remove the kernel driver, so nothing else is messing with its registers. Then i tried to turn off the pll:


  int fd,n,addr;

  unsigned char buf[3] = {0x40, 0x00, 0x0E};

  addr = 0x76;

  if ((fd = open("/dev/i2c-0", O_RDWR)) < 0)

    return -1;

  if (ioctl(fd, I2C_SLAVE, addr) < 0)

    return -1;

  n = write(fd, buf, 3);

  if (n != 3)

    printf("error! %d\n",n);


But i had no success. I was able to open the i2c-0 port and even to access the device but the write operation failed.


I also tried the i2c-tools (i2cset) but this was also not successful.


Thx for your help.