i3c: support dynamically added i2c devices
authorJamie Iles <quic_jiles@quicinc.com>
Mon, 17 Jan 2022 17:48:16 +0000 (17:48 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 4 Mar 2022 10:39:03 +0000 (11:39 +0100)
commit72a4501b5d089772671360a6ec74d5350acf8c2e
tree27d46f0684f4395baccaf347ac74234ce4fd6453
parent31b9887c7258ca47d9c665a80f19f006c86756b1
i3c: support dynamically added i2c devices

I2C devices can be added to the system dynamically through several
sources other than static board info including device tree overlays and
sysfs i2c new_device.

Add an I2C bus notifier to attach the clients at runtime if they were
not defined in the board info.  For DT devices find the LVR in the reg
property, for user-space new_device additions we synthesize a
conservative setting of no spike filters and fast mode only.

Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Jamie Iles <quic_jiles@quicinc.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220117174816.1963463-3-quic_jiles@quicinc.com
drivers/i3c/master.c