Lines Matching +full:button +full:- +full:enter

1 // SPDX-License-Identifier: GPL-2.0+
3 * Loongson-2 PM Support
94 .enter = loongson2_suspend_enter,
100 struct input_dev *button; in loongson2_power_button_init() local
102 button = input_allocate_device(); in loongson2_power_button_init()
104 return -ENOMEM; in loongson2_power_button_init()
106 button->name = "Power Button"; in loongson2_power_button_init()
107 button->phys = "pm/button/input0"; in loongson2_power_button_init()
108 button->id.bustype = BUS_HOST; in loongson2_power_button_init()
109 button->dev.parent = NULL; in loongson2_power_button_init()
110 input_set_capability(button, EV_KEY, KEY_POWER); in loongson2_power_button_init()
112 ret = input_register_device(button); in loongson2_power_button_init()
116 dev_pm_set_wake_irq(&button->dev, irq); in loongson2_power_button_init()
117 device_set_wakeup_capable(&button->dev, true); in loongson2_power_button_init()
118 device_set_wakeup_enable(&button->dev, true); in loongson2_power_button_init()
120 loongson2_pm.dev = button; in loongson2_power_button_init()
121 dev_info(dev, "Power Button: Init successful!\n"); in loongson2_power_button_init()
126 input_free_device(button); in loongson2_power_button_init()
136 pr_info("Power Button pressed...\n"); in loongson2_pm_irq_handler()
167 struct device *dev = &pdev->dev; in loongson2_pm_probe()
177 if (!device_property_read_u64(dev, "loongson,suspend-address", &suspend_addr)) in loongson2_pm_probe()
180 dev_err(dev, "No loongson,suspend-address, could not support S3!\n"); in loongson2_pm_probe()
183 return -EINVAL; in loongson2_pm_probe()
185 retval = devm_request_irq(&pdev->dev, irq, loongson2_pm_irq_handler, in loongson2_pm_probe()
205 { .compatible = "loongson,ls2k0500-pmc", },
211 .name = "ls2k-pm",
219 MODULE_DESCRIPTION("Loongson-2 PM driver");