Lines Matching refs:f01

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