Lines Matching refs:loongson2_pm
32 static struct loongson2_pm { struct
36 } loongson2_pm; argument
38 #define loongson2_pm_readw(reg) readw(loongson2_pm.base + reg)
39 #define loongson2_pm_readl(reg) readl(loongson2_pm.base + reg)
40 #define loongson2_pm_writew(val, reg) writew(val, loongson2_pm.base + reg)
41 #define loongson2_pm_writel(val, reg) writel(val, loongson2_pm.base + reg)
120 loongson2_pm.dev = button; in loongson2_power_button_init()
135 if (!loongson2_pm.suspended && (status & LOONGSON2_PM1_PWRBTN_STS)) { in loongson2_pm_irq_handler()
137 input_report_key(loongson2_pm.dev, KEY_POWER, 1); in loongson2_pm_irq_handler()
138 input_sync(loongson2_pm.dev); in loongson2_pm_irq_handler()
139 input_report_key(loongson2_pm.dev, KEY_POWER, 0); in loongson2_pm_irq_handler()
140 input_sync(loongson2_pm.dev); in loongson2_pm_irq_handler()
150 loongson2_pm.suspended = true; in loongson2_pm_suspend()
157 loongson2_pm.suspended = false; in loongson2_pm_resume()
169 loongson2_pm.base = devm_platform_ioremap_resource(pdev, 0); in loongson2_pm_probe()
170 if (IS_ERR(loongson2_pm.base)) in loongson2_pm_probe()
171 return PTR_ERR(loongson2_pm.base); in loongson2_pm_probe()
186 IRQF_SHARED, "pm_irq", &loongson2_pm); in loongson2_pm_probe()