Re: Linux power managment for loadable kernel modules

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

 



On Tue, 27 Jul 2010, Divneil Rai WADHAWAN wrote:

> Hi,
> 
> I have started the work on Linux power management, and want to hook my loadable kernel modules to power management core of kernel.
> So, as a beginning point I have gone through the Linux Symposium section of Power management and gone through the code.
> I am using kernel 2.6.23.17 at present.

That's a pretty old kernel.  You should be using 2.6.34 or 2.6.35-rc 
for new development.

> Can you please confirm is the below method to use the device_suspend functionality from kernel correct?
> I am using the TTY as an example here.
> 
> tty_class = class_create(THIS_MODULE, "tty");
> struct device *dev= device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), "tty");
> dev->class->suspend=my_suspend_method;
> dev->class->resume =my_resume_method;
> 
> Is there any other way for doing that?

You probably shouldn't use TTY as an example, because there already is 
a TTY class driver (in recent kernels).  Try writing a regular driver 
instead of a class driver.

Alan Stern

_______________________________________________
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