Hi,
We are developing a SAI codec driver based on the WN8523 and need to be able to address a second I2C device during wm8523_i2c_probe(). There are two codec chips connected in parallel to the one SAI port and both require a small I2C setup before use after which no more commands are sent.
The function wm8523_i2c_probe (struct i2c_client *i2c, const struct i2c_device_id *id) only supplies one I2C device that being declared in the device tree; if a second I2C node was added would it be possible to address it within the probe function?
Thanks.
Solved! Go to Solution.
Solved for now..
Use 2x GPIO to select I2C addresses (one per codec chip) inside init(). Select one device with GPIO connected to device h/w address pin and initialise. Repeat the process with the other GPIO address line for the other chip. One actual DTB address but initialising two chips..
Solved for now..
Use 2x GPIO to select I2C addresses (one per codec chip) inside init(). Select one device with GPIO connected to device h/w address pin and initialise. Repeat the process with the other GPIO address line for the other chip. One actual DTB address but initialising two chips..