Lines Matching +full:gesture +full:- +full:max +full:- +full:ms
29 * after soft reset, we should wait for 1 ms
33 /* and after hard reset, we should wait for max 500ms */
119 #define GESTURE 3 macro
232 touch->scan_ms = MSEC_PER_SEC / scan_rate; in set_scan_rate()
233 touch->scan_rate_param = scan_rate; in set_scan_rate()
311 dev_err(&client->dev, "Unable to reset device\n"); in synaptics_i2c_reset_config()
316 dev_err(&client->dev, "Unable to config device\n"); in synaptics_i2c_reset_config()
337 struct input_dev *input = touch->input; in synaptics_i2c_get_input()
338 int xy_delta, gesture; in synaptics_i2c_get_input() local
343 if (synaptics_i2c_check_error(touch->client)) in synaptics_i2c_get_input()
346 /* Get Gesture Bit */ in synaptics_i2c_get_input()
347 data = synaptics_i2c_reg_get(touch->client, DATA_REG0); in synaptics_i2c_get_input()
348 gesture = (data >> GESTURE) & 0x1; in synaptics_i2c_get_input()
354 xy_delta = synaptics_i2c_word_get(touch->client, REL_X_REG) & 0xffff; in synaptics_i2c_get_input()
361 input_report_key(input, BTN_LEFT, gesture); in synaptics_i2c_get_input()
365 input_report_rel(input, REL_Y, -y_delta); in synaptics_i2c_get_input()
368 return xy_delta || gesture; in synaptics_i2c_get_input()
375 mod_delayed_work(system_wq, &touch->dwork, 0); in synaptics_i2c_irq()
384 if (scan_rate != touch->scan_rate_param) in synaptics_i2c_check_params()
387 if (no_decel != touch->no_decel_param) { in synaptics_i2c_check_params()
388 touch->no_decel_param = no_decel; in synaptics_i2c_check_params()
392 if (no_filter != touch->no_filter_param) { in synaptics_i2c_check_params()
393 touch->no_filter_param = no_filter; in synaptics_i2c_check_params()
397 if (reduce_report != touch->reduce_report_param) { in synaptics_i2c_check_params()
398 touch->reduce_report_param = reduce_report; in synaptics_i2c_check_params()
403 synaptics_i2c_reset_config(touch->client); in synaptics_i2c_check_params()
413 delay = touch->scan_ms; in synaptics_i2c_adjust_delay()
415 touch->no_data_count = 0; in synaptics_i2c_adjust_delay()
417 nodata_count_thres = NO_DATA_THRES / touch->scan_ms; in synaptics_i2c_adjust_delay()
418 if (touch->no_data_count < nodata_count_thres) in synaptics_i2c_adjust_delay()
419 touch->no_data_count++; in synaptics_i2c_adjust_delay()
451 mod_delayed_work(system_wq, &touch->dwork, delay); in synaptics_i2c_work_handler()
459 ret = synaptics_i2c_reset_config(touch->client); in synaptics_i2c_open()
464 mod_delayed_work(system_wq, &touch->dwork, in synaptics_i2c_open()
475 synaptics_i2c_reg_set(touch->client, INTERRUPT_EN_REG, 0); in synaptics_i2c_close()
477 cancel_delayed_work_sync(&touch->dwork); in synaptics_i2c_close()
480 synaptics_i2c_reg_set(touch->client, DEV_CONTROL_REG, DEEP_SLEEP); in synaptics_i2c_close()
485 struct input_dev *input = touch->input; in synaptics_i2c_set_input_params()
487 input->name = touch->client->name; in synaptics_i2c_set_input_params()
488 input->phys = touch->client->adapter->name; in synaptics_i2c_set_input_params()
489 input->id.bustype = BUS_I2C; in synaptics_i2c_set_input_params()
490 input->id.version = synaptics_i2c_word_get(touch->client, in synaptics_i2c_set_input_params()
492 input->dev.parent = &touch->client->dev; in synaptics_i2c_set_input_params()
493 input->open = synaptics_i2c_open; in synaptics_i2c_set_input_params()
494 input->close = synaptics_i2c_close; in synaptics_i2c_set_input_params()
498 __set_bit(EV_REL, input->evbit); in synaptics_i2c_set_input_params()
499 __set_bit(REL_X, input->relbit); in synaptics_i2c_set_input_params()
500 __set_bit(REL_Y, input->relbit); in synaptics_i2c_set_input_params()
503 __set_bit(EV_KEY, input->evbit); in synaptics_i2c_set_input_params()
504 __set_bit(BTN_LEFT, input->keybit); in synaptics_i2c_set_input_params()
515 touch->client = client; in synaptics_i2c_touch_create()
516 touch->no_decel_param = no_decel; in synaptics_i2c_touch_create()
517 touch->scan_rate_param = scan_rate; in synaptics_i2c_touch_create()
519 INIT_DELAYED_WORK(&touch->dwork, synaptics_i2c_work_handler); in synaptics_i2c_touch_create()
531 return -ENOMEM; in synaptics_i2c_probe()
537 if (client->irq < 1) in synaptics_i2c_probe()
540 touch->input = input_allocate_device(); in synaptics_i2c_probe()
541 if (!touch->input) { in synaptics_i2c_probe()
542 ret = -ENOMEM; in synaptics_i2c_probe()
549 dev_dbg(&touch->client->dev, in synaptics_i2c_probe()
550 "Requesting IRQ: %d\n", touch->client->irq); in synaptics_i2c_probe()
552 ret = request_irq(touch->client->irq, synaptics_i2c_irq, in synaptics_i2c_probe()
556 dev_warn(&touch->client->dev, in synaptics_i2c_probe()
560 synaptics_i2c_reg_set(touch->client, in synaptics_i2c_probe()
566 dev_dbg(&touch->client->dev, in synaptics_i2c_probe()
570 ret = input_register_device(touch->input); in synaptics_i2c_probe()
572 dev_err(&client->dev, in synaptics_i2c_probe()
582 input_free_device(touch->input); in synaptics_i2c_probe()
594 free_irq(client->irq, touch); in synaptics_i2c_remove()
596 input_unregister_device(touch->input); in synaptics_i2c_remove()
605 cancel_delayed_work_sync(&touch->dwork); in synaptics_i2c_suspend()
608 synaptics_i2c_reg_set(touch->client, DEV_CONTROL_REG, DEEP_SLEEP); in synaptics_i2c_suspend()
623 mod_delayed_work(system_wq, &touch->dwork, in synaptics_i2c_resume()