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