• Home
  • Raw
  • Download

Lines Matching refs:i

127 	int t[2], s[2], i;  in adi_read_packet()  local
130 for (i = 0; i < 2; i++) { in adi_read_packet()
131 adi[i].ret = -1; in adi_read_packet()
132 t[i] = gameport_time(gameport, ADI_MAX_START); in adi_read_packet()
133 s[i] = 0; in adi_read_packet()
144 for (i = 0; i < 2; i++, w >>= 2, x >>= 2) { in adi_read_packet()
145 t[i]--; in adi_read_packet()
146 if ((w & 0x30) && s[i]) { in adi_read_packet()
147 if ((w & 0x30) < 0x30 && adi[i].ret < ADI_MAX_LENGTH && t[i] > 0) { in adi_read_packet()
148 adi[i].data[++adi[i].ret] = w; in adi_read_packet()
149 t[i] = gameport_time(gameport, ADI_MAX_STROBE); in adi_read_packet()
150 } else t[i] = 0; in adi_read_packet()
151 } else if (!(x & 0x30)) s[i] = 1; in adi_read_packet()
167 int i; in adi_move_bits() local
175 for (i = 1; i <= adi[1].ret; i++) in adi_move_bits()
176 adi[0].data[((length - 1) >> 1) + i + 1] = adi[1].data[i]; in adi_move_bits()
189 int i; in adi_get_bits() local
191 for (i = 0; i < count; i++) in adi_get_bits()
192 bits |= ((adi->data[adi->idx - i] >> 5) & 1) << i; in adi_get_bits()
205 int i, t; in adi_decode() local
210 for (i = 0; i < adi->axes10; i++) in adi_decode()
213 for (i = 0; i < adi->axes8; i++) in adi_decode()
216 for (i = 0; i < adi->buttons && i < 63; i++) { in adi_decode()
217 if (i == adi->pad) { in adi_decode()
225 for (i = 0; i < adi->hats; i++) { in adi_decode()
231 for (i = 63; i < adi->buttons; i++) in adi_decode()
245 int i; in adi_read() local
251 for (i = 0; i < 2; i++) in adi_read()
252 if (port->adi[i].length) in adi_read()
253 result |= adi_decode(port->adi + i); in adi_read()
301 int i; in adi_init_digital() local
303 for (i = 0; seq[i]; i++) { in adi_init_digital()
305 if (seq[i] > 0) in adi_init_digital()
306 msleep(seq[i]); in adi_init_digital()
307 if (seq[i] < 0) { in adi_init_digital()
308 mdelay(-seq[i]); in adi_init_digital()
309 udelay(-seq[i]*14); /* It looks like mdelay() is off by approx 1.4% */ in adi_init_digital()
316 int i, t; in adi_id_decode() local
350 i = adi_get_bits(adi, 4); in adi_id_decode()
353 adi->axes10 = adi->axes8 - i; in adi_id_decode()
354 adi->axes8 = i; in adi_id_decode()
359 for (i = 0; i < t; i++) in adi_id_decode()
360 adi->cname[i] = adi_get_bits(adi, 8); in adi_id_decode()
361 adi->cname[i] = 0; in adi_id_decode()
389 int i, t; in adi_init_input() local
419 for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad != -1)) * 2; i++) in adi_init_input()
420 set_bit(adi->abs[i], input_dev->absbit); in adi_init_input()
422 for (i = 0; i < adi->buttons; i++) in adi_init_input()
423 set_bit(adi->key[i], input_dev->keybit); in adi_init_input()
430 int i, t, x; in adi_init_center() local
435 for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad != -1)) * 2; i++) { in adi_init_center()
437 t = adi->abs[i]; in adi_init_center()
441 x = i < adi->axes10 ? 512 : 128; in adi_init_center()
443 if (i < adi->axes10) in adi_init_center()
445 else if (i < adi->axes10 + adi->axes8) in adi_init_center()
459 int i; in adi_connect() local
480 for (i = 0; i < 2; i++) { in adi_connect()
481 adi_id_decode(port->adi + i, port); in adi_connect()
483 if (!port->adi[i].length) in adi_connect()
486 err = adi_init_input(port->adi + i, port, i); in adi_connect()
505 for (i = 0; i < 2; i++) in adi_connect()
506 if (port->adi[i].length > 0) { in adi_connect()
507 adi_init_center(port->adi + i); in adi_connect()
508 err = input_register_device(port->adi[i].dev); in adi_connect()
515 fail3: while (--i >= 0) { in adi_connect()
516 if (port->adi[i].length > 0) { in adi_connect()
517 input_unregister_device(port->adi[i].dev); in adi_connect()
518 port->adi[i].dev = NULL; in adi_connect()
521 fail2: for (i = 0; i < 2; i++) in adi_connect()
522 input_free_device(port->adi[i].dev); in adi_connect()
531 int i; in adi_disconnect() local
534 for (i = 0; i < 2; i++) in adi_disconnect()
535 if (port->adi[i].length > 0) in adi_disconnect()
536 input_unregister_device(port->adi[i].dev); in adi_disconnect()