Skip to content

nuc977进入睡眠模式,但是不能通过按键唤醒设备 #75

@ghost

Description

1 我在驱动程序中开启了按键中断
在porbe函数中,使用函数device_init_wakeup(&pdev->dev, 1)
2 通过SIMPLE_DEV_PM_OPS注册了key_drv_suspend函数,并在该函数里面通过enable_irq_wake(),使能了可以通过按键来唤醒系统
3 通过SIMPLE_DEV_PM_OPS注册了key_drv_resume函数,并在该函数里面通过disable_irq_wake(),关闭了可以通过按键来唤醒系统](url)
SIMPLE_DEV_PM_OPS(wj_key_pm_ops, key_drv_suspend,key_drv_resume)
4 在driver中
.pm = &wj_key_pm_ops

最后加载驱动

5 在应用程序中通过调用echo mem > /sys/power/state让设备进入低功耗状态,但是按下按键,系统没有恢复。

@这种情况大概是哪里出现问题了呢?

如附件截图

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions