Lines Matching defs:handle

27 	__le16 handle;
75 * handle header field to identify the module in dln2_dev.mod_rx_slots and then
189 u16 handle, u16 rx_slot)
192 struct dln2_mod_rx_slots *rxs = &dln2->mod_rx_slots[handle];
212 dev_warn(dev, "bad/late response %d/%d\n", handle, rx_slot);
239 u16 id, echo, handle, size;
265 handle = le16_to_cpu(hdr->handle);
271 dev_err(dev, "size mismatch: handle %x cmd %x echo %x size %d actual %d\n",
272 handle, id, echo, size, urb->actual_length);
276 if (handle >= DLN2_HANDLES) {
277 dev_warn(dev, "invalid handle %d\n", handle);
284 if (handle == DLN2_HANDLE_EVENT) {
292 if (dln2_transfer_complete(dln2, urb, handle, echo))
302 static void *dln2_prep_buf(u16 handle, u16 cmd, u16 echo, const void *obuf,
318 hdr->handle = cpu_to_le16(handle);
327 static int dln2_send_wait(struct dln2_dev *dln2, u16 handle, u16 cmd, u16 echo,
335 buf = dln2_prep_buf(handle, cmd, echo, obuf, &len, GFP_KERNEL);
348 static bool find_free_slot(struct dln2_dev *dln2, u16 handle, int *slot)
358 rxs = &dln2->mod_rx_slots[handle];
376 static int alloc_rx_slot(struct dln2_dev *dln2, u16 handle)
385 ret = wait_event_interruptible(dln2->mod_rx_slots[handle].wq,
386 find_free_slot(dln2, handle, &slot));
393 static void free_rx_slot(struct dln2_dev *dln2, u16 handle, int slot)
400 rxs = &dln2->mod_rx_slots[handle];
426 static int _dln2_transfer(struct dln2_dev *dln2, u16 handle, u16 cmd,
436 struct dln2_mod_rx_slots *rxs = &dln2->mod_rx_slots[handle];
449 rx_slot = alloc_rx_slot(dln2, handle);
455 ret = dln2_send_wait(dln2, handle, cmd, rx_slot, obuf, obuf_len);
488 handle, le16_to_cpu(rsp->result));
502 free_rx_slot(dln2, handle, rx_slot);
519 u16 handle;
523 handle = dln2_pdata->handle;
525 return _dln2_transfer(dln2, handle, cmd, obuf, obuf_len, ibuf,
655 .handle = DLN2_HANDLE_GPIO,
664 .handle = DLN2_HANDLE_I2C,
674 .handle = DLN2_HANDLE_SPI,
684 .handle = DLN2_HANDLE_ADC,