Lines Matching refs:ibi
1893 if (olddev->ibi) {
1894 ibireq.handler = olddev->ibi->handler;
1895 ibireq.max_payload_len = olddev->ibi->max_payload_len;
1896 ibireq.num_slots = olddev->ibi->num_slots;
1898 if (olddev->ibi->enabled) {
2243 atomic_inc(&dev->ibi->pending_ibis);
2260 dev->ibi->handler(dev->dev, &payload);
2263 if (atomic_dec_and_test(&dev->ibi->pending_ibis))
2264 complete(&dev->ibi->all_ibis_handled);
2621 if (!dev->ibi)
2629 reinit_completion(&dev->ibi->all_ibis_handled);
2630 if (atomic_read(&dev->ibi->pending_ibis))
2631 wait_for_completion(&dev->ibi->all_ibis_handled);
2633 dev->ibi->enabled = false;
2643 if (!dev->ibi)
2648 dev->ibi->enabled = true;
2657 struct i3c_device_ibi_info *ibi;
2663 if (dev->ibi)
2666 ibi = kzalloc(sizeof(*ibi), GFP_KERNEL);
2667 if (!ibi)
2670 atomic_set(&ibi->pending_ibis, 0);
2671 init_completion(&ibi->all_ibis_handled);
2672 ibi->handler = req->handler;
2673 ibi->max_payload_len = req->max_payload_len;
2674 ibi->num_slots = req->num_slots;
2676 dev->ibi = ibi;
2679 kfree(ibi);
2680 dev->ibi = NULL;
2690 if (!dev->ibi)
2693 if (WARN_ON(dev->ibi->enabled))
2697 kfree(dev->ibi);
2698 dev->ibi = NULL;