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>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user