Lines Matching refs:ibi
2077 if (olddev->ibi) {
2078 ibireq.handler = olddev->ibi->handler;
2079 ibireq.max_payload_len = olddev->ibi->max_payload_len;
2080 ibireq.num_slots = olddev->ibi->num_slots;
2082 if (olddev->ibi->enabled)
2088 * So, update the olddev->ibi->enabled flag to false
2091 olddev->ibi->enabled = false;
2546 atomic_inc(&dev->ibi->pending_ibis);
2563 dev->ibi->handler(dev->dev, &payload);
2566 if (atomic_dec_and_test(&dev->ibi->pending_ibis))
2567 complete(&dev->ibi->all_ibis_handled);
2943 if (!dev->ibi)
2951 reinit_completion(&dev->ibi->all_ibis_handled);
2952 if (atomic_read(&dev->ibi->pending_ibis))
2953 wait_for_completion(&dev->ibi->all_ibis_handled);
2955 dev->ibi->enabled = false;
2965 if (!dev->ibi)
2970 dev->ibi->enabled = true;
2979 struct i3c_device_ibi_info *ibi;
2985 if (dev->ibi)
2988 ibi = kzalloc(sizeof(*ibi), GFP_KERNEL);
2989 if (!ibi)
2992 atomic_set(&ibi->pending_ibis, 0);
2993 init_completion(&ibi->all_ibis_handled);
2994 ibi->handler = req->handler;
2995 ibi->max_payload_len = req->max_payload_len;
2996 ibi->num_slots = req->num_slots;
2998 dev->ibi = ibi;
3001 kfree(ibi);
3002 dev->ibi = NULL;
3012 if (!dev->ibi)
3015 if (WARN_ON(dev->ibi->enabled))
3019 kfree(dev->ibi);
3020 dev->ibi = NULL;