Lines Matching refs:lid_switch_idev
38 static struct input_dev *lid_switch_idev; variable
132 if (!!test_bit(SW_LID, lid_switch_idev->sw) == !lid_open) in send_lid_state()
135 input_report_switch(lid_switch_idev, SW_LID, !lid_open); in send_lid_state()
136 input_sync(lid_switch_idev); in send_lid_state()
137 pm_wakeup_event(&lid_switch_idev->dev, 0); in send_lid_state()
277 if (!device_may_wakeup(&lid_switch_idev->dev)) { in xo1_sci_suspend()
499 lid_switch_idev = input_allocate_device(); in setup_lid_switch()
500 if (!lid_switch_idev) in setup_lid_switch()
503 lid_switch_idev->name = "Lid Switch"; in setup_lid_switch()
504 lid_switch_idev->phys = DRV_NAME "/input2"; in setup_lid_switch()
505 set_bit(EV_SW, lid_switch_idev->evbit); in setup_lid_switch()
506 set_bit(SW_LID, lid_switch_idev->swbit); in setup_lid_switch()
508 lid_switch_idev->dev.parent = &pdev->dev; in setup_lid_switch()
509 device_set_wakeup_capable(&lid_switch_idev->dev, true); in setup_lid_switch()
511 r = input_register_device(lid_switch_idev); in setup_lid_switch()
517 r = device_create_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode); in setup_lid_switch()
526 input_unregister_device(lid_switch_idev); in setup_lid_switch()
527 lid_switch_idev = NULL; in setup_lid_switch()
529 input_free_device(lid_switch_idev); in setup_lid_switch()
535 device_remove_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode); in free_lid_switch()
536 input_unregister_device(lid_switch_idev); in free_lid_switch()