Lines Matching refs:iforce

67 	struct iforce *iforce = input_get_drvdata(dev);  in iforce_playback()  local
68 struct iforce_core_effect *core_effect = &iforce->core_effects[effect_id]; in iforce_playback()
75 iforce_control_playback(iforce, effect_id, value); in iforce_playback()
81 struct iforce *iforce = input_get_drvdata(dev); in iforce_set_gain() local
85 iforce_send_packet(iforce, FF_CMD_GAIN, data); in iforce_set_gain()
90 struct iforce *iforce = input_get_drvdata(dev); in iforce_set_autocenter() local
95 iforce_send_packet(iforce, FF_CMD_AUTOCENTER, data); in iforce_set_autocenter()
99 iforce_send_packet(iforce, FF_CMD_AUTOCENTER, data); in iforce_set_autocenter()
108 struct iforce *iforce = input_get_drvdata(dev); in iforce_upload_effect() local
109 struct iforce_core_effect *core_effect = &iforce->core_effects[effect->id]; in iforce_upload_effect()
123 ret = iforce_upload_periodic(iforce, effect, old); in iforce_upload_effect()
127 ret = iforce_upload_constant(iforce, effect, old); in iforce_upload_effect()
132 ret = iforce_upload_condition(iforce, effect, old); in iforce_upload_effect()
154 struct iforce *iforce = input_get_drvdata(dev); in iforce_erase_effect() local
155 struct iforce_core_effect *core_effect = &iforce->core_effects[effect_id]; in iforce_erase_effect()
172 struct iforce *iforce = input_get_drvdata(dev); in iforce_open() local
174 iforce->xport_ops->start_io(iforce); in iforce_open()
178 iforce_send_packet(iforce, FF_CMD_ENABLE, "\004"); in iforce_open()
186 struct iforce *iforce = input_get_drvdata(dev); in iforce_close() local
192 if (test_bit(FF_CORE_IS_USED, iforce->core_effects[i].flags)) { in iforce_close()
201 iforce_send_packet(iforce, FF_CMD_ENABLE, "\001"); in iforce_close()
203 wait_event_interruptible(iforce->wait, in iforce_close()
204 !test_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags)); in iforce_close()
207 iforce->xport_ops->stop_io(iforce); in iforce_close()
211 struct iforce *iforce) in iforce_init_device() argument
225 init_waitqueue_head(&iforce->wait); in iforce_init_device()
226 spin_lock_init(&iforce->xmit_lock); in iforce_init_device()
227 mutex_init(&iforce->mem_mutex); in iforce_init_device()
228 iforce->xmit.buf = iforce->xmit_data; in iforce_init_device()
229 iforce->dev = input_dev; in iforce_init_device()
238 input_set_drvdata(input_dev, iforce); in iforce_init_device()
248 iforce->device_memory.name = "I-Force device effect memory"; in iforce_init_device()
249 iforce->device_memory.start = 0; in iforce_init_device()
250 iforce->device_memory.end = 200; in iforce_init_device()
251 iforce->device_memory.flags = IORESOURCE_MEM; in iforce_init_device()
252 iforce->device_memory.parent = NULL; in iforce_init_device()
253 iforce->device_memory.child = NULL; in iforce_init_device()
254 iforce->device_memory.sibling = NULL; in iforce_init_device()
261 if (!iforce_get_id_packet(iforce, 'O', buf, &len)) in iforce_init_device()
275 if (!iforce_get_id_packet(iforce, 'M', buf, &len) || len < 3) in iforce_init_device()
278 dev_warn(&iforce->dev->dev, "Device does not respond to id packet M\n"); in iforce_init_device()
280 if (!iforce_get_id_packet(iforce, 'P', buf, &len) || len < 3) in iforce_init_device()
283 dev_warn(&iforce->dev->dev, "Device does not respond to id packet P\n"); in iforce_init_device()
285 if (!iforce_get_id_packet(iforce, 'B', buf, &len) || len < 3) in iforce_init_device()
286 iforce->device_memory.end = get_unaligned_le16(buf + 1); in iforce_init_device()
288 dev_warn(&iforce->dev->dev, "Device does not respond to id packet B\n"); in iforce_init_device()
290 if (!iforce_get_id_packet(iforce, 'N', buf, &len) || len < 2) in iforce_init_device()
293 dev_warn(&iforce->dev->dev, "Device does not respond to id packet N\n"); in iforce_init_device()
297 dev_warn(&iforce->dev->dev, "Limiting number of effects to %d (device reports %d)\n", in iforce_init_device()
307 if (!iforce_get_id_packet(iforce, c[i], buf, &len)) in iforce_init_device()
308 iforce_dump_packet(iforce, "info", in iforce_init_device()
325 iforce->type = iforce_device + i; in iforce_init_device()
326 input_dev->name = iforce->type->name; in iforce_init_device()
335 for (i = 0; iforce->type->btn[i] >= 0; i++) in iforce_init_device()
336 set_bit(iforce->type->btn[i], input_dev->keybit); in iforce_init_device()
338 for (i = 0; iforce->type->abs[i] >= 0; i++) { in iforce_init_device()
340 signed short t = iforce->type->abs[i]; in iforce_init_device()
371 for (i = 0; iforce->type->ff[i] >= 0; i++) in iforce_init_device()
372 set_bit(iforce->type->ff[i], input_dev->ffbit); in iforce_init_device()
389 error = input_register_device(iforce->dev); in iforce_init_device()