Skip to contentSkip to conversation

Supporting new features in I2C

DISCUSSION vidhumouli hunsigida 2 participants 2 messages Sep 12, 2008 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

The I2C host controller chip has two features named HOLD and Slave Monitor.

HOLD is the typical feature of holding the clock low to support for the slow devices. It can be enabled or disabled through software control by writing a bit in the registor.

I am writing a bus driver for this core.
I am not sure where and how this provision is to be added in the I2C adapter code.

I could not find any such provision in the exising bus drivers. I could not find any related information in the Linux kernel documentation.

Can any one give me how can this be done?

Similarly for Slave Monitor, where a host monitors for the ack received from the slave device.
This can also be enabled/disabled by setting a bit in the register. How is this to be handled in the current i2c adapter code?

Thanks.

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

#1 lore raw
Quoted 5 lines · vidhumouli hunsigida

The I2C host controller chip has two features named HOLD and Slave Monitor.

HOLD is the typical feature of holding the clock low to support for the slow devices. It can be enabled or disabled through software control by writing a bit in the registor.

This should be normal behaviour for an i2c bus, some controllers can support it, but there is no need to add any extra functionality to the i2c layer for this. The driver is free to do it or not do it.

If you want to driver to do either, then you can either have it as a module parameter and/or have some configuration file in sysfs to change the state.

Quoted 10 lines

I am writing a bus driver for this core.
I am not sure where and how this provision is to be added in the I2C adapter code.

I could not find any such provision in the exising bus drivers. I could not find any related information in the Linux kernel documentation.

Can any one give me how can this be done?

Similarly for Slave Monitor, where a host monitors for the ack received from the slave device.
This can also be enabled/disabled by setting a bit in the register. How is this to be handled in the current i2c adapter code?

I suggest you have a look at the drivers in drivers/i2c/busses and also include/linux/i2c.h (pay particual attention to 'struct i2c_algorithm' which can be used to add new bus drivers).

Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'