Small cleanups for input
Hi!
Here are some small cleanups, please apply,
Pavel
include/linux/serio.h +0 -4
@@ -18,10 +18,7 @@#include <linux/list.h> -struct serio ; -struct serio { -void *private;void *driver;char *name;
@@ -46,7 +43,6 @@ };struct serio_dev { -void *private;char *name;
drivers/input/power.c +0 -4
@@ -45,9 +45,7 @@static int suspend_button_pushed =0 ;static void suspend_button_task_handler (void *data) { -//extern void pm_do_suspend(void); udelay (200 );/* debounce */ -//pm_do_suspend(); suspend_button_pushed =0 ; }
@@ -67,8 +65,6 @@case KEY_SUSPEND :printk ("Powering down entire device\n" ); -//pm_send_all(PM_SUSPEND, dev); -if (!suspend_button_pushed) { suspend_button_pushed =1 ;schedule_work (&suspend_button_task);
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
This needs to be migrated to the new power management code.
Quoted 24 lines
===================================================================
drivers/input/power.c +0
-4@@ -45,9 +45,7 @@static int suspend_button_pushed =0 ;static void suspend_button_task_handler (void *data) { -//extern void pm_do_suspend(void); udelay (200 );/* debounce */ -//pm_do_suspend(); suspend_button_pushed =0 ; }@@ -67,8 +65,6 @@case KEY_SUSPEND :printk ("Powering down entire device\n" ); -//pm_send_all(PM_SUSPEND, dev); -if (!suspend_button_pushed) { suspend_button_pushed =1 ;schedule_work (&suspend_button_task);
Hi!
Quoted 1 line
This needs to be migrated to the new power management code.
What exactly should it do? Suspend machine? Then it needs to do equivalent of "echo 3 > /proc/acpi/sleep", but I do not think we have generic interface for that...
Perhaps some comment should be put there?
Pavel
Quoted 25 lines
Quoted 24 lines
===================================================================
drivers/input/power.c +0
-4@@ -45,9 +45,7 @@static int suspend_button_pushed =0 ;static void suspend_button_task_handler (void *data) { -//extern void pm_do_suspend(void); udelay (200 );/* debounce */ -//pm_do_suspend(); suspend_button_pushed =0 ; }@@ -67,8 +65,6 @@case KEY_SUSPEND :printk ("Powering down entire device\n" ); -//pm_send_all(PM_SUSPEND, dev); -if (!suspend_button_pushed) { suspend_button_pushed =1 ;schedule_work (&suspend_button_task);
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 5 lines · Pavel Machek
Quoted 1 line
This needs to be migrated to the new power management code.
What exactly should it do? Suspend machine? Then it needs to do equivalent of "echo 3 >
/proc/acpi/sleep", but I do not think we have generic interface for that...
It looks like it was intended to call an old version of the suspend code on ARM devices - probably the power button on the iPAQ.
The correct function (in the ARM tree) is now called "suspend()" and deals with suspending the devices and then whatever is needed to cause the CPU to go into deep sleep - ie, the user visible "power off" state.
Absolutely nothing to do with swsusp I'm afraid. 8)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
===================================================================
drivers/input/power.c +0
-2@@ -45,9 +45,7 @@static int suspend_button_pushed =0 ;static void suspend_button_task_handler (void *data) { -//extern void pm_do_suspend(void); udelay (200 );/* debounce */ -//pm_do_suspend(); suspend_button_pushed =0 ; }
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Hi!
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
This needs to be migrated to the new power management code.
What exactly should it do? Suspend machine? Then it needs to do equivalent of "echo 3 >
/proc/acpi/sleep", but I do not think we have generic interface for that...
Quoted 7 lines
It looks like it was intended to call an old version of the suspend code on ARM devices - probably the power button on the iPAQ.
The correct function (in the ARM tree) is now called "
suspend()" and deals with suspending the devices and then whatever is needed to cause the CPU to go into deep sleep - ie, the user visible "power off" state.
So perhaps we need to add machine_suspend_ram() and machine_suspend_disk() to reboot.h? We *do* want to have some generic interface...
Quoted 1 line
Absolutely nothing to do with swsusp I'm afraid. 8)
That's okay, I'm doing suspend-to-RAM, too.
Pavel
Quoted 13 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
===================================================================
drivers/input/power.c +0
-2@@ -45,9 +45,7 @@static int suspend_button_pushed =0 ;static void suspend_button_task_handler (void *data) { -//extern void pm_do_suspend(void); udelay (200 );/* debounce */ -//pm_do_suspend(); suspend_button_pushed =0 ; }
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 3 lines · Pavel Machek
So perhaps we need to add
machine_suspend_ram()andmachine_suspend_disk()toreboot.h? We *do* want to have some generic interface...
Sounds good.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 7 lines · Pavel Machek
Quoted 3 lines
So perhaps we need to add
machine_suspend_ram()andmachine_suspend_disk()toreboot.h? We *do* want to have some generic interface...Sounds good.
This would be really nice :-) Very handy for PDAs.
Quoted 6 lines · Russell King
Quoted 3 lines · Pavel Machek
So perhaps we need to add
machine_suspend_ram()andmachine_suspend_disk()toreboot.h? We *do* want to have some generic interface...Sounds good.
There is a similar thing in development at
bk://ldm.bkbits.net/linux-2.5-power/
Things are still a bit rough, and there isn't much documentation, as I'm busy trying to get it all work correctly before OLS.
FWIW, I will be talking about this at OLS (and not the posted topic). A paper describing the work is here:
http://kernel.org/pub/linux/kernel/people/mochel/doc/papers/power-ols2003.tar.gz
I should have more to say in the next week or two..
-pat
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
This needs to be migrated to the new power management code.
What exactly should it do? Suspend machine? Then it needs to do equivalent of "echo 3 >
/proc/acpi/sleep", but I do not think we have generic interface for that...It looks like it was intended to call an old version of the suspend code on ARM devices - probably the power button on the iPAQ.
Yeap. I wrote that code for use on a iPAQ. I was hoping for a generic interface for this some time in 2.5.X.
Quoted 3 lines
The correct function (in the ARM tree) is now called "
suspend()" and deals with suspending the devices and then whatever is needed to cause the CPU to go into deep sleep - ie, the user visible "power off" state.
Needs updating :-)