How should I use kernel-defined i2c structs in this driver
Subsystems (2)
Could anybody please give a hint - which kernel-defined i2c objects, and how many of them, I need to define and use to substitute these driver-defined functions i2c_read(), i2c_write() ?
https://github.com/bluecherrydvr/linux/blob/release/tw5864/1.16/drivers/media/pci/tw5864/tw5864-config.c
In a word, there's 4 chips with different addresses, to which this code communicates via main chip's dedicated registers.
Do i need a single i2c_adapter or several?
Do i need i2c_client entities?
where should I put what is named "devid" here?
Thanks in advance.
Quoted 11 lines · Andrey Utkin
Could anybody please give a hint - which kernel-defined i2c objects, and how many of them, I need to define and use to substitute these driver-defined functions
i2c_read(),i2c_write()?
https://github.com/bluecherrydvr/linux/blob/release/tw5864/1.16/drivers/media/pci/tw5864/tw5864-config.c
In a word, there's 4 chips with different addresses, to which this code communicates via main chip's dedicated registers.
Do i need a singlei2c_adapteror several?
Do i needi2c_cliententities?
where should I put what is named "devid" here?Thanks in advance.
It depends how those are connected at hardware level. Quickly looking I think "devid" is here to select proper I2C adapter. So I think there is 4 I2C adapters and each of those adapter has 1 slave device. Is that correct? If yes, then register 4 I2C adapters and register single client for each of those adapters.
regards
Antti
Signature · 1 line
http://palosaari.fi/