Power event notification patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Folks,

 

Here is a simple patch for power event notification to user-space applications. Basically, what it does is notify the user-space applications that the system is going to a low power state (Suspend-to-RAM and Suspend-to-Disk) and resume from that state. This is useful for the user-space applications to do some significant action when the system goes to the low power state (like saving an unsaved file). The user-space objects can form a netlink socket and listen to these events. It is done through a kobject-netlink socket. For this I have used the kobject_uevent system call, posting the notification to user space with standby, hibernate and resume in the action parameter of the kobject_uevent call (mapped to KOBJ_S3, KOBJ_S4 and KOBJ_RESUME enums). Appreciate your comments on the patch.

 

Thanks,

Sankara Narayanan V.

 

Attachment: pwr-evnt-notfn.patch
Description: pwr-evnt-notfn.patch

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux