Lines Matching defs:num

56  * @num: endpoint number
61 static inline int hw_ep_bit(int num, int dir)
63 return num + ((dir == TX) ? 16 : 0);
99 * @num: endpoint number
104 static int hw_ep_flush(struct ci_hdrc *ci, int num, int dir)
106 int n = hw_ep_bit(num, dir);
121 * @num: endpoint number
126 static int hw_ep_disable(struct ci_hdrc *ci, int num, int dir)
128 hw_write(ci, OP_ENDPTCTRL + num,
136 * @num: endpoint number
142 static int hw_ep_enable(struct ci_hdrc *ci, int num, int dir, int type)
165 hw_write(ci, OP_ENDPTCTRL + num, mask, data);
172 * @num: endpoint number
177 static int hw_ep_get_halt(struct ci_hdrc *ci, int num, int dir)
181 return hw_read(ci, OP_ENDPTCTRL + num, mask) ? 1 : 0;
187 * @num: endpoint number
193 static int hw_ep_prime(struct ci_hdrc *ci, int num, int dir, int is_ctrl)
195 int n = hw_ep_bit(num, dir);
200 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num)))
207 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num)))
218 * @num: endpoint number
224 static int hw_ep_set_halt(struct ci_hdrc *ci, int num, int dir, int value)
230 enum ci_hw_regs reg = OP_ENDPTCTRL + num;
237 } while (value != hw_ep_get_halt(ci, num, dir));
423 return ((ep->dir == TX) ? USB_ENDPOINT_DIR_MASK : 0) | ep->num;
592 int n = hw_ep_bit(hwep->num, hwep->dir);
635 ret = hw_ep_prime(ci, hwep->num, hwep->dir,
661 return hw_ep_prime(ci, hwep->num, hwep->dir,
689 int n = hw_ep_bit(hwep->num, hwep->dir);
758 hw_ep_flush(hwep->ci, hwep->num, hwep->dir);
812 retval |= hw_ep_set_halt(hwep->ci, hwep->num, hwep->dir, value);
991 int dir, num, retval;
1017 num = le16_to_cpu(setup->wIndex) & USB_ENDPOINT_NUMBER_MASK;
1018 *(u16 *)req->buf = hw_ep_get_halt(ci, num, dir);
1149 int type, num, dir, err = -EINVAL;
1176 num = le16_to_cpu(req.wIndex);
1177 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX;
1178 num &= USB_ENDPOINT_NUMBER_MASK;
1180 num += ci->hw_ep_max / 2;
1181 if (!ci->ci_hw_ep[num].wedge) {
1184 &ci->ci_hw_ep[num].ep);
1228 num = le16_to_cpu(req.wIndex);
1229 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX;
1230 num &= USB_ENDPOINT_NUMBER_MASK;
1232 num += ci->hw_ep_max / 2;
1235 err = _ep_set_halt(&ci->ci_hw_ep[num].ep, 1, false);
1380 hwep->num = usb_endpoint_num(desc);
1402 if (hwep->num != 0 && hwep->type == USB_ENDPOINT_XFER_CONTROL) {
1411 if (hwep->num)
1412 retval |= hw_ep_enable(hwep->ci, hwep->num, hwep->dir,
1446 retval |= hw_ep_disable(hwep->ci, hwep->num, hwep->dir);
1557 hw_ep_flush(hwep->ci, hwep->num, hwep->dir);
1633 hw_ep_flush(hwep->ci, hwep->num, hwep->dir);