iMX8 SoC codec - single driver addressing two I2C devices.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX8 SoC codec - single driver addressing two I2C devices.

ソリューションへジャンプ
1,039件の閲覧回数
edwardtyrrell
Senior Contributor I

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.

0 件の賞賛
返信
1 解決策
1,025件の閲覧回数
edwardtyrrell
Senior Contributor I

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..

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,026件の閲覧回数
edwardtyrrell
Senior Contributor I

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..

0 件の賞賛
返信