Lines Matching full:i3c
4 * "DSP0233 Management Component Transport Protocol (MCTP) I3C Transport
13 #include <linux/i3c/device.h>
14 #include <linux/i3c/master.h>
73 struct i3c_device *i3c; member
82 /* I3C dynamic address */
128 rc = i3c_device_do_priv_xfers(mi->i3c, &xfer, 1); in mctp_i3c_read()
133 /* Bad i3c bus driver */ in mctp_i3c_read()
175 static void mctp_i3c_ibi_handler(struct i3c_device *i3c, in mctp_i3c_ibi_handler() argument
178 struct mctp_i3c_device *mi = i3cdev_get_drvdata(i3c); in mctp_i3c_ibi_handler()
186 /* Not a mctp-i3c interrupt, ignore it */ in mctp_i3c_ibi_handler()
193 dev_warn_once(i3cdev_to_dev(i3c), "IBI with missing MDB"); in mctp_i3c_ibi_handler()
210 i3c_device_get_info(mi->i3c, &info); in mctp_i3c_setup()
217 rc = i3c_device_request_ibi(mi->i3c, &ibi); in mctp_i3c_setup()
221 * (ENOTSUPP is from the i3c layer, not EOPNOTSUPP). in mctp_i3c_setup()
223 dev_warn(i3cdev_to_dev(mi->i3c), in mctp_i3c_setup()
227 dev_err(i3cdev_to_dev(mi->i3c), in mctp_i3c_setup()
232 rc = i3c_device_enable_ibi(mi->i3c); in mctp_i3c_setup()
237 dev_err(i3cdev_to_dev(mi->i3c), "Failed enabling IBI (%d)\n", rc); in mctp_i3c_setup()
244 i3c_device_free_ibi(mi->i3c); in mctp_i3c_setup()
252 struct i3c_device *i3c) in mctp_i3c_add_device() argument
264 mi->i3c = i3c; in mctp_i3c_add_device()
268 i3cdev_set_drvdata(i3c, mi); in mctp_i3c_add_device()
280 dev_warn(i3cdev_to_dev(i3c), "Error adding mctp-i3c device, %d\n", rc); in mctp_i3c_add_device()
284 static int mctp_i3c_probe(struct i3c_device *i3c) in mctp_i3c_probe() argument
291 if (b->bus == i3c->bus) { in mctp_i3c_probe()
298 /* probably no "mctp-controller" property on the i3c bus */ in mctp_i3c_probe()
302 return mctp_i3c_add_device(mbus, i3c); in mctp_i3c_probe()
312 i3c_device_disable_ibi(mi->i3c); in mctp_i3c_remove_device()
313 i3c_device_free_ibi(mi->i3c); in mctp_i3c_remove_device()
316 i3cdev_set_drvdata(mi->i3c, NULL); in mctp_i3c_remove_device()
324 static void mctp_i3c_remove(struct i3c_device *i3c) in mctp_i3c_remove() argument
326 struct mctp_i3c_device *mi = i3cdev_get_drvdata(i3c); in mctp_i3c_remove()
376 /* I3C endpoint went away after the packet was enqueued? */ in mctp_i3c_xmit()
408 rc = i3c_device_do_priv_xfers(mi->i3c, &xfer, 1); in mctp_i3c_xmit()
592 dev_err(&ndev->dev, "No I3C PID available\n"); in mctp_i3c_bus_add()
640 /* Removes all mctp-i3c busses */
710 .name = "mctp-i3c",
744 pr_warn("MCTP I3C could not unregister notifier, %d\n", rc); in mctp_i3c_mod_exit()
752 MODULE_DEVICE_TABLE(i3c, mctp_i3c_ids);
753 MODULE_DESCRIPTION("MCTP I3C device");