Lines Matching refs:iforce

68 	struct iforce *iforce = input_get_drvdata(dev);  in iforce_playback()  local
69 struct iforce_core_effect *core_effect = &iforce->core_effects[effect_id]; in iforce_playback()
76 iforce_control_playback(iforce, effect_id, value); in iforce_playback()
82 struct iforce *iforce = input_get_drvdata(dev); in iforce_set_gain() local
86 iforce_send_packet(iforce, FF_CMD_GAIN, data); in iforce_set_gain()
91 struct iforce *iforce = input_get_drvdata(dev); in iforce_set_autocenter() local
96 iforce_send_packet(iforce, FF_CMD_AUTOCENTER, data); in iforce_set_autocenter()
100 iforce_send_packet(iforce, FF_CMD_AUTOCENTER, data); in iforce_set_autocenter()
109 struct iforce *iforce = input_get_drvdata(dev); in iforce_upload_effect() local
110 struct iforce_core_effect *core_effect = &iforce->core_effects[effect->id]; in iforce_upload_effect()
124 ret = iforce_upload_periodic(iforce, effect, old); in iforce_upload_effect()
128 ret = iforce_upload_constant(iforce, effect, old); in iforce_upload_effect()
133 ret = iforce_upload_condition(iforce, effect, old); in iforce_upload_effect()
155 struct iforce *iforce = input_get_drvdata(dev); in iforce_erase_effect() local
156 struct iforce_core_effect *core_effect = &iforce->core_effects[effect_id]; in iforce_erase_effect()
173 struct iforce *iforce = input_get_drvdata(dev); in iforce_open() local
175 iforce->xport_ops->start_io(iforce); in iforce_open()
179 iforce_send_packet(iforce, FF_CMD_ENABLE, "\004"); in iforce_open()
187 struct iforce *iforce = input_get_drvdata(dev); in iforce_close() local
193 if (test_bit(FF_CORE_IS_USED, iforce->core_effects[i].flags)) { in iforce_close()
202 iforce_send_packet(iforce, FF_CMD_ENABLE, "\001"); in iforce_close()
204 wait_event_interruptible(iforce->wait, in iforce_close()
205 !test_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags)); in iforce_close()
208 iforce->xport_ops->stop_io(iforce); in iforce_close()
212 struct iforce *iforce) in iforce_init_device() argument
226 init_waitqueue_head(&iforce->wait); in iforce_init_device()
227 spin_lock_init(&iforce->xmit_lock); in iforce_init_device()
228 mutex_init(&iforce->mem_mutex); in iforce_init_device()
229 iforce->xmit.buf = iforce->xmit_data; in iforce_init_device()
230 iforce->dev = input_dev; in iforce_init_device()
239 input_set_drvdata(input_dev, iforce); in iforce_init_device()
249 iforce->device_memory.name = "I-Force device effect memory"; in iforce_init_device()
250 iforce->device_memory.start = 0; in iforce_init_device()
251 iforce->device_memory.end = 200; in iforce_init_device()
252 iforce->device_memory.flags = IORESOURCE_MEM; in iforce_init_device()
253 iforce->device_memory.parent = NULL; in iforce_init_device()
254 iforce->device_memory.child = NULL; in iforce_init_device()
255 iforce->device_memory.sibling = NULL; in iforce_init_device()
262 if (!iforce_get_id_packet(iforce, 'O', buf, &len)) in iforce_init_device()
276 if (!iforce_get_id_packet(iforce, 'M', buf, &len) && len >= 3) in iforce_init_device()
279 dev_warn(&iforce->dev->dev, "Device does not respond to id packet M\n"); in iforce_init_device()
281 if (!iforce_get_id_packet(iforce, 'P', buf, &len) && len >= 3) in iforce_init_device()
284 dev_warn(&iforce->dev->dev, "Device does not respond to id packet P\n"); in iforce_init_device()
286 if (!iforce_get_id_packet(iforce, 'B', buf, &len) && len >= 3) in iforce_init_device()
287 iforce->device_memory.end = get_unaligned_le16(buf + 1); in iforce_init_device()
289 dev_warn(&iforce->dev->dev, "Device does not respond to id packet B\n"); in iforce_init_device()
291 if (!iforce_get_id_packet(iforce, 'N', buf, &len) && len >= 2) in iforce_init_device()
294 dev_warn(&iforce->dev->dev, "Device does not respond to id packet N\n"); in iforce_init_device()
298 dev_warn(&iforce->dev->dev, "Limiting number of effects to %d (device reports %d)\n", in iforce_init_device()
308 if (!iforce_get_id_packet(iforce, c[i], buf, &len)) in iforce_init_device()
309 iforce_dump_packet(iforce, "info", in iforce_init_device()
326 iforce->type = iforce_device + i; in iforce_init_device()
327 input_dev->name = iforce->type->name; in iforce_init_device()
336 for (i = 0; iforce->type->btn[i] >= 0; i++) in iforce_init_device()
337 set_bit(iforce->type->btn[i], input_dev->keybit); in iforce_init_device()
339 for (i = 0; iforce->type->abs[i] >= 0; i++) { in iforce_init_device()
341 signed short t = iforce->type->abs[i]; in iforce_init_device()
372 for (i = 0; iforce->type->ff[i] >= 0; i++) in iforce_init_device()
373 set_bit(iforce->type->ff[i], input_dev->ffbit); in iforce_init_device()
390 error = input_register_device(iforce->dev); in iforce_init_device()