diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-16 14:04:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-16 14:04:46 -0700 |
commit | 31dda85e49da949fdea5fd4e1fdeeabc44e59625 (patch) | |
tree | ed2f9ada1e77e9712257edca798868eaecf1cb34 /include | |
parent | aa62325dc38de2be8b1c27eb180ad3751b3f58ec (diff) | |
parent | 6030f42d20cedc04df019891851320f3e257038b (diff) |
Merge tag 'i3c/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
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
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i3c/device.h | 4 | ||||
-rw-r--r-- | include/linux/i3c/master.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h index 5ecb055fd375..de102e4418ab 100644 --- a/include/linux/i3c/device.h +++ b/include/linux/i3c/device.h @@ -188,6 +188,10 @@ static inline struct i3c_driver *drv_to_i3cdrv(struct device_driver *drv) struct device *i3cdev_to_dev(struct i3c_device *i3cdev); struct i3c_device *dev_to_i3cdev(struct device *dev); +const struct i3c_device_id * +i3c_device_match_id(struct i3c_device *i3cdev, + const struct i3c_device_id *id_table); + static inline void i3cdev_set_drvdata(struct i3c_device *i3cdev, void *data) { diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index 1f08fa8d69d2..9cb39d901cd5 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -71,6 +71,9 @@ struct i2c_dev_boardinfo { * @common: common part of the I2C device descriptor * @boardinfo: pointer to the boardinfo attached to this I2C device * @dev: I2C device object registered to the I2C framework + * @addr: I2C device address + * @lvr: LVR (Legacy Virtual Register) needed by the I3C core to know about + * the I2C device limitations * * Each I2C device connected on the bus will have an i2c_dev_desc. * This object is created by the core and later attached to the controller @@ -84,6 +87,8 @@ struct i2c_dev_desc { struct i3c_i2c_dev_desc common; const struct i2c_dev_boardinfo *boardinfo; struct i2c_client *dev; + u16 addr; + u8 lvr; }; /** |