0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _LINUX_I2C_SMBUS_H
0009 #define _LINUX_I2C_SMBUS_H
0010
0011 #include <linux/i2c.h>
0012 #include <linux/spinlock.h>
0013 #include <linux/workqueue.h>
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 struct i2c_smbus_alert_setup {
0026 int irq;
0027 };
0028
0029 struct i2c_client *i2c_new_smbus_alert_device(struct i2c_adapter *adapter,
0030 struct i2c_smbus_alert_setup *setup);
0031 int i2c_handle_smbus_alert(struct i2c_client *ara);
0032
0033 #if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_I2C_SLAVE)
0034 struct i2c_client *i2c_new_slave_host_notify_device(struct i2c_adapter *adapter);
0035 void i2c_free_slave_host_notify_device(struct i2c_client *client);
0036 #else
0037 static inline struct i2c_client *i2c_new_slave_host_notify_device(struct i2c_adapter *adapter)
0038 {
0039 return ERR_PTR(-ENOSYS);
0040 }
0041 static inline void i2c_free_slave_host_notify_device(struct i2c_client *client)
0042 {
0043 }
0044 #endif
0045
0046 #if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_DMI)
0047 void i2c_register_spd(struct i2c_adapter *adap);
0048 #else
0049 static inline void i2c_register_spd(struct i2c_adapter *adap) { }
0050 #endif
0051
0052 #endif