Lines Matching refs:f01
259 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_get_product_ID() local
261 return f01->properties.product_id; in rmi_f01_get_product_ID()
269 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_manufacturer_id_show() local
272 f01->properties.manufacturer_id); in rmi_driver_manufacturer_id_show()
282 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_dom_show() local
284 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.dom); in rmi_driver_dom_show()
294 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_product_id_show() local
296 return scnprintf(buf, PAGE_SIZE, "%s\n", f01->properties.product_id); in rmi_driver_product_id_show()
306 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_firmware_id_show() local
308 return scnprintf(buf, PAGE_SIZE, "%d\n", f01->properties.firmware_id); in rmi_driver_firmware_id_show()
318 struct f01_data *f01 = dev_get_drvdata(&data->f01_container->dev); in rmi_driver_package_id_show() local
320 u32 package_id = f01->properties.package_id; in rmi_driver_package_id_show()
390 struct f01_data *f01; in rmi_f01_probe() local
402 f01 = devm_kzalloc(&fn->dev, sizeof(struct f01_data), GFP_KERNEL); in rmi_f01_probe()
403 if (!f01) in rmi_f01_probe()
406 f01->num_of_irq_regs = driver_data->num_of_irq_regs; in rmi_f01_probe()
414 &f01->device_control.ctrl0); in rmi_f01_probe()
424 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_probe()
427 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_probe()
436 if ((f01->device_control.ctrl0 & RMI_F01_CTRL0_SLEEP_MODE_MASK) != in rmi_f01_probe()
440 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_probe()
443 f01->device_control.ctrl0 |= RMI_F01_CTRL0_CONFIGURED_BIT; in rmi_f01_probe()
446 f01->device_control.ctrl0); in rmi_f01_probe()
460 &f01->properties); in rmi_f01_probe()
467 f01->properties.manufacturer_id == 1 ? "Synaptics" : "unknown", in rmi_f01_probe()
468 f01->properties.product_id, f01->properties.firmware_id); in rmi_f01_probe()
472 ctrl_base_addr += f01->num_of_irq_regs; in rmi_f01_probe()
475 if (f01->properties.has_adjustable_doze) { in rmi_f01_probe()
476 f01->doze_interval_addr = ctrl_base_addr; in rmi_f01_probe()
480 f01->device_control.doze_interval = in rmi_f01_probe()
482 error = rmi_write(rmi_dev, f01->doze_interval_addr, in rmi_f01_probe()
483 f01->device_control.doze_interval); in rmi_f01_probe()
491 error = rmi_read(rmi_dev, f01->doze_interval_addr, in rmi_f01_probe()
492 &f01->device_control.doze_interval); in rmi_f01_probe()
501 f01->wakeup_threshold_addr = ctrl_base_addr; in rmi_f01_probe()
505 f01->device_control.wakeup_threshold = in rmi_f01_probe()
507 error = rmi_write(rmi_dev, f01->wakeup_threshold_addr, in rmi_f01_probe()
508 f01->device_control.wakeup_threshold); in rmi_f01_probe()
516 error = rmi_read(rmi_dev, f01->wakeup_threshold_addr, in rmi_f01_probe()
517 &f01->device_control.wakeup_threshold); in rmi_f01_probe()
527 if (f01->properties.has_lts) in rmi_f01_probe()
530 if (f01->properties.has_adjustable_doze_holdoff) { in rmi_f01_probe()
531 f01->doze_holdoff_addr = ctrl_base_addr; in rmi_f01_probe()
535 f01->device_control.doze_holdoff = in rmi_f01_probe()
537 error = rmi_write(rmi_dev, f01->doze_holdoff_addr, in rmi_f01_probe()
538 f01->device_control.doze_holdoff); in rmi_f01_probe()
546 error = rmi_read(rmi_dev, f01->doze_holdoff_addr, in rmi_f01_probe()
547 &f01->device_control.doze_holdoff); in rmi_f01_probe()
571 dev_set_drvdata(&fn->dev, f01); in rmi_f01_probe()
588 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_config() local
592 f01->device_control.ctrl0); in rmi_f01_config()
599 if (f01->properties.has_adjustable_doze) { in rmi_f01_config()
600 error = rmi_write(fn->rmi_dev, f01->doze_interval_addr, in rmi_f01_config()
601 f01->device_control.doze_interval); in rmi_f01_config()
609 f01->wakeup_threshold_addr, in rmi_f01_config()
610 &f01->device_control.wakeup_threshold, in rmi_f01_config()
620 if (f01->properties.has_adjustable_doze_holdoff) { in rmi_f01_config()
621 error = rmi_write(fn->rmi_dev, f01->doze_holdoff_addr, in rmi_f01_config()
622 f01->device_control.doze_holdoff); in rmi_f01_config()
635 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_suspend() local
638 f01->old_nosleep = in rmi_f01_suspend()
639 f01->device_control.ctrl0 & RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
640 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
642 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_suspend()
644 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_RESERVED1; in rmi_f01_suspend()
646 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_SENSOR_SLEEP; in rmi_f01_suspend()
649 f01->device_control.ctrl0); in rmi_f01_suspend()
652 if (f01->old_nosleep) in rmi_f01_suspend()
653 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_suspend()
654 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_suspend()
655 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL; in rmi_f01_suspend()
664 struct f01_data *f01 = dev_get_drvdata(&fn->dev); in rmi_f01_resume() local
667 if (f01->old_nosleep) in rmi_f01_resume()
668 f01->device_control.ctrl0 |= RMI_F01_CTRL0_NOSLEEP_BIT; in rmi_f01_resume()
670 f01->device_control.ctrl0 &= ~RMI_F01_CTRL0_SLEEP_MODE_MASK; in rmi_f01_resume()
671 f01->device_control.ctrl0 |= RMI_SLEEP_MODE_NORMAL; in rmi_f01_resume()
674 f01->device_control.ctrl0); in rmi_f01_resume()