Commit 1df77528 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i3c updates from Alexandre Belloni:
 "The silvaco driver gets support for the integration of the IP in the
  Nuvoton npcm845 SoC. There is also a fix for a possible NULL pointer
  dereference that can happen with early IBIs. Summary:

  Core:

    - Fix a possible NULL pointer dereference due to IBI coming when the
      target driver is not yet probed.

  Drivers:

    - mipi-i3c-hci: Use I2C DMA-safe api

    - svc: add Nuvoton npcm845 support"

* tag 'i3c/for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
  i3c: Add NULL pointer check in i3c_master_queue_ibi()
  i3c: master: Drop duplicate check before calling OF APIs
  i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
  i3c: master: svc: Fix missing STOP for master request
  i3c: master: svc: Use readsb helper for reading MDB
  i3c: master: svc: Fix missing the IBI rules
  i3c: master: svc: Fix i3c_master_get_free_addr return check
  i3c: master: svc: Fix npcm845 DAA process corruption
  i3c: master: svc: Fix npcm845 invalid slvstart event
  i3c: master: svc: Fix npcm845 FIFO empty issue
  i3c: master: svc: Add support for Nuvoton npcm845 i3c
  dt-bindings: i3c: silvaco: Add npcm845 compatible string
  dt-bindings: i3c: dw: Add power-domains
  i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
  i3c: mipi-i3c-hci: Use I2C DMA-safe api
  i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API
  MAINTAINERS: Add Frank Li to Silvaco I3C
  MAINTAINERS: Remove Conor Culhane from Silvaco I3C
parents 696c45bc bd496a44
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -855,6 +855,10 @@ N: John Crispin
E: john@phrozen.org
D: MediaTek MT7623 Gigabit ethernet support

N: Conor Culhane
E: conor.culhane@silvaco.com
D: Silvaco I3C master driver

N: Laurence Culhane
E: loz@holmes.demon.co.uk
D: Wrote the initial alpha SLIP code
+3 −1
Original line number Diff line number Diff line
@@ -14,7 +14,9 @@ allOf:

properties:
  compatible:
    const: silvaco,i3c-master-v1
    enum:
      - nuvoton,npcm845-i3c
      - silvaco,i3c-master-v1

  reg:
    maxItems: 1
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ properties:
  interrupts:
    maxItems: 1

  power-domains:
    maxItems: 1

required:
  - compatible
  - reg
+3 −1
Original line number Diff line number Diff line
@@ -11265,6 +11265,7 @@ F: drivers/i3c/master/dw*
I3C SUBSYSTEM
M:	Alexandre Belloni <alexandre.belloni@bootlin.com>
R:	Frank Li <Frank.Li@nxp.com>
L:	linux-i3c@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
C:	irc://chat.freenode.net/linux-i3c
@@ -22106,8 +22107,9 @@ F: drivers/video/fbdev/sm712*
SILVACO I3C DUAL-ROLE MASTER
M:	Miquel Raynal <miquel.raynal@bootlin.com>
M:	Conor Culhane <conor.culhane@silvaco.com>
M:	Frank Li <Frank.Li@nxp.com>
L:	linux-i3c@lists.infradead.org (moderated for non-subscribers)
L:	imx@lists.linux.dev
S:	Maintained
F:	Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
F:	drivers/i3c/master/svc-i3c-master.c
+9 −12
Original line number Diff line number Diff line
@@ -2276,7 +2276,7 @@ static int of_i3c_master_add_dev(struct i3c_master_controller *master,
	u32 reg[3];
	int ret;

	if (!master || !node)
	if (!master)
		return -EINVAL;

	ret = of_property_read_u32_array(node, "reg", reg, ARRAY_SIZE(reg));
@@ -2369,14 +2369,10 @@ static u8 i3c_master_i2c_get_lvr(struct i2c_client *client)
{
	/* Fall back to no spike filters and FM bus mode. */
	u8 lvr = I3C_LVR_I2C_INDEX(2) | I3C_LVR_I2C_FM_MODE;

	if (client->dev.of_node) {
	u32 reg[3];

		if (!of_property_read_u32_array(client->dev.of_node, "reg",
						reg, ARRAY_SIZE(reg)))
	if (!of_property_read_u32_array(client->dev.of_node, "reg", reg, ARRAY_SIZE(reg)))
		lvr = reg[2];
	}

	return lvr;
}
@@ -2486,7 +2482,7 @@ static int i3c_master_i2c_adapter_init(struct i3c_master_controller *master)
	struct i2c_adapter *adap = i3c_master_to_i2c_adapter(master);
	struct i2c_dev_desc *i2cdev;
	struct i2c_dev_boardinfo *i2cboardinfo;
	int ret, id = -ENODEV;
	int ret, id;

	adap->dev.parent = master->dev.parent;
	adap->owner = master->dev.parent->driver->owner;
@@ -2497,9 +2493,7 @@ static int i3c_master_i2c_adapter_init(struct i3c_master_controller *master)
	adap->timeout = 1000;
	adap->retries = 3;

	if (master->dev.of_node)
	id = of_alias_get_id(master->dev.of_node, "i2c");

	if (id >= 0) {
		adap->nr = id;
		ret = i2c_add_numbered_adapter(adap);
@@ -2561,6 +2555,9 @@ static void i3c_master_unregister_i3c_devs(struct i3c_master_controller *master)
 */
void i3c_master_queue_ibi(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot)
{
	if (!dev->ibi || !slot)
		return;

	atomic_inc(&dev->ibi->pending_ibis);
	queue_work(dev->ibi->wq, &slot->work);
}
Loading