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
270 return sysfs_emit(buf, "%d\n", f01->properties.manufacturer_id); in rmi_driver_manufacturer_id_show()
280 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_dom_show() local
282 return sysfs_emit(buf, "%s\n", f01->properties.dom); in rmi_driver_dom_show()
292 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_product_id_show() local
294 return sysfs_emit(buf, "%s\n", f01->properties.product_id); in rmi_driver_product_id_show()
304 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_firmware_id_show() local
306 return sysfs_emit(buf, "%d\n", f01->properties.firmware_id); in rmi_driver_firmware_id_show()
316 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_package_id_show() local
318 u32 package_id = f01->properties.package_id; in rmi_driver_package_id_show()
388 struct f01_data *f01; in rmi_f01_probe() local
400 f01 = devm_kzalloc(&fn->dev, sizeof(struct f01_data), GFP_KERNEL); in rmi_f01_probe()
401 if (!f01) in rmi_f01_probe()
404 f01->num_of_irq_regs = driver_data->num_of_irq_regs; in rmi_f01_probe()
412 &f01->device_control.ctrl0); in rmi_f01_probe()
422 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_probe()
425 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_probe()
434 if ((f01->device_control.ctrl0 & RMI_F01_CTRL0_SLEEP_MODE_MASK) != in rmi_f01_probe()
438 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_probe()
441 f01->device_control.ctrl0 |= RMI_F01_CTRL0_CONFIGURED_BIT; in rmi_f01_probe()
444 f01->device_control.ctrl0); in rmi_f01_probe()
458 &f01->properties); in rmi_f01_probe()
465 f01->properties.manufacturer_id == 1 ? "Synaptics" : "unknown", in rmi_f01_probe()
466 f01->properties.product_id, f01->properties.firmware_id); in rmi_f01_probe()
470 ctrl_base_addr += f01->num_of_irq_regs; in rmi_f01_probe()
473 if (f01->properties.has_adjustable_doze) { in rmi_f01_probe()
474 f01->doze_interval_addr = ctrl_base_addr; in rmi_f01_probe()
478 f01->device_control.doze_interval = in rmi_f01_probe()
480 error = rmi_write(rmi_dev, f01->doze_interval_addr, in rmi_f01_probe()
481 f01->device_control.doze_interval); in rmi_f01_probe()
489 error = rmi_read(rmi_dev, f01->doze_interval_addr, in rmi_f01_probe()
490 &f01->device_control.doze_interval); in rmi_f01_probe()
499 f01->wakeup_threshold_addr = ctrl_base_addr; in rmi_f01_probe()
503 f01->device_control.wakeup_threshold = in rmi_f01_probe()
505 error = rmi_write(rmi_dev, f01->wakeup_threshold_addr, in rmi_f01_probe()
506 f01->device_control.wakeup_threshold); in rmi_f01_probe()
514 error = rmi_read(rmi_dev, f01->wakeup_threshold_addr, in rmi_f01_probe()
515 &f01->device_control.wakeup_threshold); in rmi_f01_probe()
525 if (f01->properties.has_lts) in rmi_f01_probe()
528 if (f01->properties.has_adjustable_doze_holdoff) { in rmi_f01_probe()
529 f01->doze_holdoff_addr = ctrl_base_addr; in rmi_f01_probe()
533 f01->device_control.doze_holdoff = in rmi_f01_probe()
535 error = rmi_write(rmi_dev, f01->doze_holdoff_addr, in rmi_f01_probe()
536 f01->device_control.doze_holdoff); in rmi_f01_probe()
544 error = rmi_read(rmi_dev, f01->doze_holdoff_addr, in rmi_f01_probe()
545 &f01->device_control.doze_holdoff); in rmi_f01_probe()
569 dev_set_drvdata(&fn->dev, f01); in rmi_f01_probe()
586 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_config() local
590 f01->device_control.ctrl0); in rmi_f01_config()
597 if (f01->properties.has_adjustable_doze) { in rmi_f01_config()
598 error = rmi_write(fn->rmi_dev, f01->doze_interval_addr, in rmi_f01_config()
599 f01->device_control.doze_interval); in rmi_f01_config()
607 f01->wakeup_threshold_addr, in rmi_f01_config()
608 &f01->device_control.wakeup_threshold, in rmi_f01_config()
618 if (f01->properties.has_adjustable_doze_holdoff) { in rmi_f01_config()
619 error = rmi_write(fn->rmi_dev, f01->doze_holdoff_addr, in rmi_f01_config()
620 f01->device_control.doze_holdoff); in rmi_f01_config()
633 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_suspend() local
636 f01->old_nosleep = in rmi_f01_suspend()
637 f01->device_control.ctrl0 & RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
638 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
640 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_suspend()
642 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_RESERVED1; in rmi_f01_suspend()
644 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_SENSOR_SLEEP; in rmi_f01_suspend()
647 f01->device_control.ctrl0); in rmi_f01_suspend()
650 if (f01->old_nosleep) in rmi_f01_suspend()
651 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
652 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_suspend()
653 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL; in rmi_f01_suspend()
662 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_resume() local
665 if (f01->old_nosleep) in rmi_f01_resume()
666 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_resume()
668 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_resume()
669 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL; in rmi_f01_resume()
672 f01->device_control.ctrl0); in rmi_f01_resume()