Lines Matching refs:ibi
1891 if (olddev->ibi) {
1892 ibireq.handler = olddev->ibi->handler;
1893 ibireq.max_payload_len = olddev->ibi->max_payload_len;
1894 ibireq.num_slots = olddev->ibi->num_slots;
1896 if (olddev->ibi->enabled) {
2358 atomic_inc(&dev->ibi->pending_ibis);
2375 dev->ibi->handler(dev->dev, &payload);
2378 if (atomic_dec_and_test(&dev->ibi->pending_ibis))
2379 complete(&dev->ibi->all_ibis_handled);
2736 if (!dev->ibi)
2744 reinit_completion(&dev->ibi->all_ibis_handled);
2745 if (atomic_read(&dev->ibi->pending_ibis))
2746 wait_for_completion(&dev->ibi->all_ibis_handled);
2748 dev->ibi->enabled = false;
2758 if (!dev->ibi)
2763 dev->ibi->enabled = true;
2772 struct i3c_device_ibi_info *ibi;
2778 if (dev->ibi)
2781 ibi = kzalloc(sizeof(*ibi), GFP_KERNEL);
2782 if (!ibi)
2785 atomic_set(&ibi->pending_ibis, 0);
2786 init_completion(&ibi->all_ibis_handled);
2787 ibi->handler = req->handler;
2788 ibi->max_payload_len = req->max_payload_len;
2789 ibi->num_slots = req->num_slots;
2791 dev->ibi = ibi;
2794 kfree(ibi);
2795 dev->ibi = NULL;
2805 if (!dev->ibi)
2808 if (WARN_ON(dev->ibi->enabled))
2812 kfree(dev->ibi);
2813 dev->ibi = NULL;