Lines Matching refs:ibi
1944 if (olddev->ibi) {
1945 ibireq.handler = olddev->ibi->handler;
1946 ibireq.max_payload_len = olddev->ibi->max_payload_len;
1947 ibireq.num_slots = olddev->ibi->num_slots;
1949 if (olddev->ibi->enabled) {
2407 atomic_inc(&dev->ibi->pending_ibis);
2424 dev->ibi->handler(dev->dev, &payload);
2427 if (atomic_dec_and_test(&dev->ibi->pending_ibis))
2428 complete(&dev->ibi->all_ibis_handled);
2804 if (!dev->ibi)
2812 reinit_completion(&dev->ibi->all_ibis_handled);
2813 if (atomic_read(&dev->ibi->pending_ibis))
2814 wait_for_completion(&dev->ibi->all_ibis_handled);
2816 dev->ibi->enabled = false;
2826 if (!dev->ibi)
2831 dev->ibi->enabled = true;
2840 struct i3c_device_ibi_info *ibi;
2846 if (dev->ibi)
2849 ibi = kzalloc(sizeof(*ibi), GFP_KERNEL);
2850 if (!ibi)
2853 atomic_set(&ibi->pending_ibis, 0);
2854 init_completion(&ibi->all_ibis_handled);
2855 ibi->handler = req->handler;
2856 ibi->max_payload_len = req->max_payload_len;
2857 ibi->num_slots = req->num_slots;
2859 dev->ibi = ibi;
2862 kfree(ibi);
2863 dev->ibi = NULL;
2873 if (!dev->ibi)
2876 if (WARN_ON(dev->ibi->enabled))
2880 kfree(dev->ibi);
2881 dev->ibi = NULL;