Pull i3c updates from Boris Brezillon: "Core changes: - Export i3c_device_match_id() so driver can get per-device data - Add addr and lvr fields to i2c_dev_desc so we can attach I2C devices that are not described in the DT - Add a missing of_node_put() - Fix a memory leak - Use dev_to_i3cmaster() instead of open-coding it Driver changes: - Use for_each_set_bit() in the Cadence driver" * tag 'i3c/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Use dev_to_i3cmaster() i3c: master: fix a memory leak bug i3c: add addr and lvr to i2c_dev_desc structure i3c: master: cdns: Use for_each_set_bit() i3c: master: Add of_node_put() before return i3c: move i3c_device_match_id to device.c and export it
Showing the changes to include/linux (2 of 6 files). Show all
Unified · Split
| @@ -188,6 +188,10 @@ static inline struct i3c_driver *drv_to_i3cdrv(struct device_driver *drv) · 187 unmodified lines | ||
| 188 | 188 | struct device *i3cdev_to_dev(struct i3c_device *i3cdev); |
| 189 | 189 | struct i3c_device *dev_to_i3cdev(struct device *dev); |
| 190 | 190 | |
| 191 | +const struct i3c_device_id * | |
| 192 | +i3c_device_match_id(struct i3c_device *i3cdev, | |
| 193 | + const struct i3c_device_id *id_table); | |
| 194 | + | |
| 191 | 195 | static inline void i3cdev_set_drvdata(struct i3c_device *i3cdev, |
| 192 | 196 | void *data) |
| 193 | 197 | { |
| @@ -71,6 +71,9 @@ struct i2c_dev_boardinfo { · 70 unmodified lines | ||
| 71 | 71 | * @common: common part of the I2C device descriptor |
| 72 | 72 | * @boardinfo: pointer to the boardinfo attached to this I2C device |
| 73 | 73 | * @dev: I2C device object registered to the I2C framework |
| 74 | + * @addr: I2C device address | |
| 75 | + * @lvr: LVR (Legacy Virtual Register) needed by the I3C core to know about | |
| 76 | + * the I2C device limitations | |
| 74 | 77 | * |
| 75 | 78 | * Each I2C device connected on the bus will have an i2c_dev_desc. |
| 76 | 79 | * This object is created by the core and later attached to the controller |
| @@ -84,6 +87,8 @@ struct i2c_dev_desc { · 7 unmodified lines | ||
| 84 | 87 | struct i3c_i2c_dev_desc common; |
| 85 | 88 | const struct i2c_dev_boardinfo *boardinfo; |
| 86 | 89 | struct i2c_client *dev; |
| 90 | + u16 addr; | |
| 91 | + u8 lvr; | |
| 87 | 92 | }; |
| 88 | 93 | |
| 89 | 94 | /** |