i have read that " ioctl(file, I2C_SLAVE, addr);
doesn't try and detect if a device with the given address is present ".
Actually i have connected 2 slave device on " /dev/i2c-2" . one is BQ27Z561 and another is ADC.
I need to integrate code such that if slave address of BQ27Z561 is not present on this bus (" /dev/i2c-2") then i have to use ADC to show battery percentage.
But i have need code that tell me 'slave address of BQ27Z561 is not present on this bus (" /dev/i2c-2")'
So please provide me way to detect if a device with the given address is present on " /dev/i2c-2".