Lines Matching defs:f01
258 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
260 return f01->properties.product_id;
268 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
271 f01->properties.manufacturer_id);
281 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
283 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.dom);
293 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
295 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.product_id);
305 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
307 return scnprintf(buf, PAGE_SIZE, "%d\n", f01->properties.firmware_id);
317 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
319 u32 package_id = f01->properties.package_id;
389 struct f01_data *f01;
401 f01 = devm_kzalloc(&fn->dev, sizeof(struct f01_data), GFP_KERNEL);
402 if (!f01)
405 f01->num_of_irq_regs = driver_data->num_of_irq_regs;
413 &f01->device_control.ctrl0);
423 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT;
426 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
435 if ((f01->device_control.ctrl0 & RMI_F01_CTRL0_SLEEP_MODE_MASK) !=
439 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
442 f01->device_control.ctrl0 |= RMI_F01_CTRL0_CONFIGURED_BIT;
445 f01->device_control.ctrl0);
459 &f01->properties);
466 f01->properties.manufacturer_id == 1 ? "Synaptics" : "unknown",
467 f01->properties.product_id, f01->properties.firmware_id);
471 ctrl_base_addr += f01->num_of_irq_regs;
474 if (f01->properties.has_adjustable_doze) {
475 f01->doze_interval_addr = ctrl_base_addr;
479 f01->device_control.doze_interval =
481 error = rmi_write(rmi_dev, f01->doze_interval_addr,
482 f01->device_control.doze_interval);
490 error = rmi_read(rmi_dev, f01->doze_interval_addr,
491 &f01->device_control.doze_interval);
500 f01->wakeup_threshold_addr = ctrl_base_addr;
504 f01->device_control.wakeup_threshold =
506 error = rmi_write(rmi_dev, f01->wakeup_threshold_addr,
507 f01->device_control.wakeup_threshold);
515 error = rmi_read(rmi_dev, f01->wakeup_threshold_addr,
516 &f01->device_control.wakeup_threshold);
526 if (f01->properties.has_lts)
529 if (f01->properties.has_adjustable_doze_holdoff) {
530 f01->doze_holdoff_addr = ctrl_base_addr;
534 f01->device_control.doze_holdoff =
536 error = rmi_write(rmi_dev, f01->doze_holdoff_addr,
537 f01->device_control.doze_holdoff);
545 error = rmi_read(rmi_dev, f01->doze_holdoff_addr,
546 &f01->device_control.doze_holdoff);
570 dev_set_drvdata(&fn->dev, f01);
587 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
591 f01->device_control.ctrl0);
598 if (f01->properties.has_adjustable_doze) {
599 error = rmi_write(fn->rmi_dev, f01->doze_interval_addr,
600 f01->device_control.doze_interval);
608 f01->wakeup_threshold_addr,
609 &f01->device_control.wakeup_threshold,
619 if (f01->properties.has_adjustable_doze_holdoff) {
620 error = rmi_write(fn->rmi_dev, f01->doze_holdoff_addr,
621 f01->device_control.doze_holdoff);
634 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
637 f01->old_nosleep =
638 f01->device_control.ctrl0 & RMI_F01_CTRL0_NOSLEEP_BIT;
639 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT;
641 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
643 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_RESERVED1;
645 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_SENSOR_SLEEP;
648 f01->device_control.ctrl0);
651 if (f01->old_nosleep)
652 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
653 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
654 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL;
663 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
666 if (f01->old_nosleep)
667 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
669 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
670 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL;
673 f01->device_control.ctrl0);