]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/i2c.h
printk: when dumping regs, show the stack, not thread_info
[karo-tx-linux.git] / include / linux / i2c.h
index 96a25ae14494cc889dc002d965f79c6473296e8a..fffdc270ca18518f4e3c05b5efd2749f52b28f50 100644 (file)
@@ -126,6 +126,11 @@ i2c_smbus_read_i2c_block_data_or_emulated(const struct i2c_client *client,
                                          u8 command, u8 length, u8 *values);
 #endif /* I2C */
 
+enum i2c_alert_protocol {
+       I2C_PROTOCOL_SMBUS_ALERT,
+       I2C_PROTOCOL_SMBUS_HOST_NOTIFY,
+};
+
 /**
  * struct i2c_driver - represent an I2C device driver
  * @class: What kind of i2c device we instantiate (for detect)
@@ -180,8 +185,11 @@ struct i2c_driver {
         * The format and meaning of the data value depends on the protocol.
         * For the SMBus alert protocol, there is a single bit of data passed
         * as the alert response's low bit ("event flag").
+        * For the SMBus Host Notify protocol, the data corresponds to the
+        * 16-bit payload data reported by the slave device acting as master.
         */
-       void (*alert)(struct i2c_client *, unsigned int data);
+       void (*alert)(struct i2c_client *, enum i2c_alert_protocol protocol,
+                     unsigned int data);
 
        /* a ioctl like command that can be used to perform specific functions
         * with the device.
@@ -349,6 +357,11 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr);
 extern struct i2c_client *
 i2c_new_dummy(struct i2c_adapter *adap, u16 address);
 
+extern struct i2c_client *
+i2c_new_secondary_device(struct i2c_client *client,
+                               const char *name,
+                               u16 default_addr);
+
 extern void i2c_unregister_device(struct i2c_client *);
 #endif /* I2C */