summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-01 22:45:51 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-01 19:36:19 +0300
commit4124c4eba40256b65acb5016a1edfdd59a1960b6 (patch)
tree6e4ca51577d3df12ada66b8bc62abfd7d444c5a7 /include/linux/i2c.h
parent0daaf99d8424f12cdf87e00c435c9cb93667f519 (diff)
downloadlinux-4124c4eba40256b65acb5016a1edfdd59a1960b6.tar.xz
i2c: allow attaching IRQ resources to i2c_board_info
Simple integer for interrupt number is not expressive enough, as it does not convey interrupt trigger type that should be used. Let's allow attaching array of resources to the board info and have i2c core parse first IRQ resource and set up interrupt trigger as needed. Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 6366989d1001..c5bd8b8daf97 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -304,6 +304,8 @@ static inline int i2c_slave_event(struct i2c_client *client,
* @of_node: pointer to OpenFirmware device node
* @fwnode: device node supplied by the platform firmware
* @properties: additional device properties for the device
+ * @resources: resources associated with the device
+ * @num_resources: number of resources in the @resources array
* @irq: stored in i2c_client.irq
*
* I2C doesn't actually support hardware probing, although controllers and
@@ -326,6 +328,8 @@ struct i2c_board_info {
struct device_node *of_node;
struct fwnode_handle *fwnode;
const struct property_entry *properties;
+ const struct resource *resources;
+ unsigned int num_resources;
int irq;
};