I3C for 6.2

Subsystem:
  - API changes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmOZBikACgkQY6TcMGxw
 OjLydRAAvGj9pMWXgfmKkgzfE0Sp9ZDM0kTYHYUhc0B3dn6P30fBgXbG3IxLsW4Z
 aMHlTZB7UONQ3R9E7ITIQQ9h2ENibxpHZCG9O0pPnivPHMZaqcoUP36NhISPEilN
 WzFsANyZ1wlIygyO2o+NH5sPfH8XNJMTRCPKTZXOsK5tT1bw3FQs1RC+PCo1ATbp
 o75mq80zr7vdTyaMjqPnNjt/jRe4NDWyj5Auec6cXRUwOXwok5V2tYDzlXmV6RSm
 uwMx8ygXAfrYyCiTiT8HylVg2bxhAYuyY6c/GfBY+S/9AxGyOFZyDVleo3OxNvGE
 1snk9W3haA/lHn4jE042cBsFhJ8JDHLSqvf+Q18hZRLRCfFDC3nL6KGTE6++acos
 EZUaPxSfTnJrZOQJjL+Pi99mFYr3VGTMStq88xOCiQo5BX8fabRNz9ivj7Sofxs5
 x3tVMBo62KKxCq/4nSEKjxm6dkcYIOa/wsfhxs+ps2369Hilz6GvBU4gndUxeyzi
 SoZHoc/wcu954vawKwMehtq0kFXaWcSuWj6BZ9rUUBD3h2gPOGiR3/GRtS10BgFd
 Iu0ImjgKlT2b+urGbiU0TSI9PYJZeSaFGfD+s/fwkXTi4R2ivhZr08qUP/iXxAGx
 c0lb8iw0x7DVjhbuTvYm2DE9HC1rtBFfAdxS2KXVN0e4ajIhcpc=
 =7DYJ
 -----END PGP SIGNATURE-----

Merge tag 'i3c/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux

Pull i3c updates from Alexandre Belloni:
 "A non-urgent fix and SETDASA is now exported to drivers"

* tag 'i3c/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
  MAINTAINERS: mark I3C DRIVER FOR SYNOPSYS DESIGNWARE orphan
  i3c: export SETDASA method
  i3c: Correct the macro module_i3c_i2c_driver
This commit is contained in:
Linus Torvalds 2022-12-14 09:34:26 -08:00
commit a0a6c76cf2
5 changed files with 45 additions and 3 deletions

View File

@ -9770,8 +9770,7 @@ F: Documentation/devicetree/bindings/i3c/cdns,i3c-master.yaml
F: drivers/i3c/master/i3c-master-cdns.c
I3C DRIVER FOR SYNOPSYS DESIGNWARE
M: Vitor Soares <vitor.soares@synopsys.com>
S: Maintained
S: Orphan
F: Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml
F: drivers/i3c/master/dw*

View File

@ -50,6 +50,26 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev,
}
EXPORT_SYMBOL_GPL(i3c_device_do_priv_xfers);
/**
* i3c_device_do_setdasa() - do I3C dynamic address assignement with
* static address
*
* @dev: device with which the DAA should be done
*
* Return: 0 in case of success, a negative error core otherwise.
*/
int i3c_device_do_setdasa(struct i3c_device *dev)
{
int ret;
i3c_bus_normaluse_lock(dev->bus);
ret = i3c_dev_setdasa_locked(dev->desc);
i3c_bus_normaluse_unlock(dev->bus);
return ret;
}
EXPORT_SYMBOL_GPL(i3c_device_do_setdasa);
/**
* i3c_device_get_info() - get I3C device information
*

View File

@ -15,6 +15,7 @@ extern struct bus_type i3c_bus_type;
void i3c_bus_normaluse_lock(struct i3c_bus *bus);
void i3c_bus_normaluse_unlock(struct i3c_bus *bus);
int i3c_dev_setdasa_locked(struct i3c_dev_desc *dev);
int i3c_dev_do_priv_xfers_locked(struct i3c_dev_desc *dev,
struct i3c_priv_xfer *xfers,
int nxfers);

View File

@ -2708,6 +2708,25 @@ int i3c_master_unregister(struct i3c_master_controller *master)
}
EXPORT_SYMBOL_GPL(i3c_master_unregister);
int i3c_dev_setdasa_locked(struct i3c_dev_desc *dev)
{
struct i3c_master_controller *master;
if (!dev)
return -ENOENT;
master = i3c_dev_get_master(dev);
if (!master)
return -EINVAL;
if (!dev->boardinfo || !dev->boardinfo->init_dyn_addr ||
!dev->boardinfo->static_addr)
return -EINVAL;
return i3c_master_setdasa_locked(master, dev->info.static_addr,
dev->boardinfo->init_dyn_addr);
}
int i3c_dev_do_priv_xfers_locked(struct i3c_dev_desc *dev,
struct i3c_priv_xfer *xfers,
int nxfers)

View File

@ -287,12 +287,15 @@ static inline void i3c_i2c_driver_unregister(struct i3c_driver *i3cdrv,
#define module_i3c_i2c_driver(__i3cdrv, __i2cdrv) \
module_driver(__i3cdrv, \
i3c_i2c_driver_register, \
i3c_i2c_driver_unregister)
i3c_i2c_driver_unregister, \
__i2cdrv)
int i3c_device_do_priv_xfers(struct i3c_device *dev,
struct i3c_priv_xfer *xfers,
int nxfers);
int i3c_device_do_setdasa(struct i3c_device *dev);
void i3c_device_get_info(struct i3c_device *dev, struct i3c_device_info *info);
struct i3c_ibi_payload {