Lines Matching defs:f01
256 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
258 return f01->properties.product_id;
266 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
269 f01->properties.manufacturer_id);
279 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
281 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.dom);
291 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
293 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.product_id);
303 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
305 return scnprintf(buf, PAGE_SIZE, "%d\n", f01->properties.firmware_id);
315 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev);
317 u32 package_id = f01->properties.package_id;
387 struct f01_data *f01;
399 f01 = devm_kzalloc(&fn->dev, sizeof(struct f01_data), GFP_KERNEL);
400 if (!f01)
403 f01->num_of_irq_regs = driver_data->num_of_irq_regs;
411 &f01->device_control.ctrl0);
421 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT;
424 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
433 if ((f01->device_control.ctrl0 & RMI_F01_CTRL0_SLEEP_MODE_MASK) !=
437 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
440 f01->device_control.ctrl0 |= RMI_F01_CTRL0_CONFIGURED_BIT;
443 f01->device_control.ctrl0);
457 &f01->properties);
464 f01->properties.manufacturer_id == 1 ? "Synaptics" : "unknown",
465 f01->properties.product_id, f01->properties.firmware_id);
469 ctrl_base_addr += f01->num_of_irq_regs;
472 if (f01->properties.has_adjustable_doze) {
473 f01->doze_interval_addr = ctrl_base_addr;
477 f01->device_control.doze_interval =
479 error = rmi_write(rmi_dev, f01->doze_interval_addr,
480 f01->device_control.doze_interval);
488 error = rmi_read(rmi_dev, f01->doze_interval_addr,
489 &f01->device_control.doze_interval);
498 f01->wakeup_threshold_addr = ctrl_base_addr;
502 f01->device_control.wakeup_threshold =
504 error = rmi_write(rmi_dev, f01->wakeup_threshold_addr,
505 f01->device_control.wakeup_threshold);
513 error = rmi_read(rmi_dev, f01->wakeup_threshold_addr,
514 &f01->device_control.wakeup_threshold);
524 if (f01->properties.has_lts)
527 if (f01->properties.has_adjustable_doze_holdoff) {
528 f01->doze_holdoff_addr = ctrl_base_addr;
532 f01->device_control.doze_holdoff =
534 error = rmi_write(rmi_dev, f01->doze_holdoff_addr,
535 f01->device_control.doze_holdoff);
543 error = rmi_read(rmi_dev, f01->doze_holdoff_addr,
544 &f01->device_control.doze_holdoff);
568 dev_set_drvdata(&fn->dev, f01);
585 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
589 f01->device_control.ctrl0);
596 if (f01->properties.has_adjustable_doze) {
597 error = rmi_write(fn->rmi_dev, f01->doze_interval_addr,
598 f01->device_control.doze_interval);
606 f01->wakeup_threshold_addr,
607 &f01->device_control.wakeup_threshold,
617 if (f01->properties.has_adjustable_doze_holdoff) {
618 error = rmi_write(fn->rmi_dev, f01->doze_holdoff_addr,
619 f01->device_control.doze_holdoff);
632 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
635 f01->old_nosleep =
636 f01->device_control.ctrl0 & RMI_F01_CTRL0_NOSLEEP_BIT;
637 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT;
639 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
641 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_RESERVED1;
643 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_SENSOR_SLEEP;
646 f01->device_control.ctrl0);
649 if (f01->old_nosleep)
650 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
651 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
652 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL;
661 struct f01_data *f01 = dev_get_drvdata(&fn->dev);
664 if (f01->old_nosleep)
665 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT;
667 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK;
668 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL;
671 f01->device_control.ctrl0);