public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Small cleanups for input
@ 2003-06-24 10:10 Pavel Machek
  2003-07-08 22:59 ` James Simmons
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2003-06-24 10:10 UTC (permalink / raw)
  To: vojtech, Rusty trivial patch monkey Russell, kernel list

Hi!

Here are some small cleanups, please apply,
						Pavel
Index: linux/include/linux/serio.h
===================================================================
--- linux.orig/include/linux/serio.h	2003-06-24 11:54:39.000000000 +0200
+++ linux/include/linux/serio.h	2003-05-06 00:51:25.000000000 +0200
@@ -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;
 
Index: linux/drivers/input/power.c
===================================================================
--- linux.orig/drivers/input/power.c	2003-06-24 11:54:39.000000000 +0200
+++ linux/drivers/input/power.c	2003-04-18 16:19:02.000000000 +0200
@@ -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);

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-06-24 10:10 Small cleanups for input Pavel Machek
@ 2003-07-08 22:59 ` James Simmons
  2003-07-08 23:14   ` Pavel Machek
  0 siblings, 1 reply; 9+ messages in thread
From: James Simmons @ 2003-07-08 22:59 UTC (permalink / raw)
  To: Pavel Machek; +Cc: vojtech, Rusty trivial patch monkey Russell, kernel list


This needs to be migrated to the new power management code.

> ===================================================================
> --- linux.orig/drivers/input/power.c	2003-06-24 11:54:39.000000000 +0200
> +++ linux/drivers/input/power.c	2003-04-18 16:19:02.000000000 +0200
> @@ -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);
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 22:59 ` James Simmons
@ 2003-07-08 23:14   ` Pavel Machek
  2003-07-08 23:23     ` Russell King
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2003-07-08 23:14 UTC (permalink / raw)
  To: James Simmons; +Cc: vojtech, Rusty trivial patch monkey Russell, kernel list

Hi!

> 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

> > ===================================================================
> > --- linux.orig/drivers/input/power.c	2003-06-24 11:54:39.000000000 +0200
> > +++ linux/drivers/input/power.c	2003-04-18 16:19:02.000000000 +0200
> > @@ -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);
> > 
> > 
> 

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:14   ` Pavel Machek
@ 2003-07-08 23:23     ` Russell King
  2003-07-08 23:32       ` Pavel Machek
  2003-07-08 23:50       ` James Simmons
  0 siblings, 2 replies; 9+ messages in thread
From: Russell King @ 2003-07-08 23:23 UTC (permalink / raw)
  To: Pavel Machek
  Cc: James Simmons, vojtech, Rusty trivial patch monkey Russell,
	kernel list

On Wed, Jul 09, 2003 at 01:14:19AM +0200, Pavel Machek wrote:
> > 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)

> > > ===================================================================
> > > --- linux.orig/drivers/input/power.c	2003-06-24 11:54:39.000000000 +0200
> > > +++ linux/drivers/input/power.c	2003-04-18 16:19:02.000000000 +0200
> > > @@ -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;
> > >  }

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:23     ` Russell King
@ 2003-07-08 23:32       ` Pavel Machek
  2003-07-08 23:51         ` Russell King
  2003-07-08 23:50       ` James Simmons
  1 sibling, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2003-07-08 23:32 UTC (permalink / raw)
  To: James Simmons, vojtech, Rusty trivial patch monkey Russell,
	kernel list

Hi!

> > > 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.

So perhaps we need to add machine_suspend_ram() and
machine_suspend_disk() to reboot.h? We *do* want to have some generic
interface...

> Absolutely nothing to do with swsusp I'm afraid. 8)

That's okay, I'm doing suspend-to-RAM, too.
								Pavel

> > > > ===================================================================
> > > > --- linux.orig/drivers/input/power.c	2003-06-24 11:54:39.000000000 +0200
> > > > +++ linux/drivers/input/power.c	2003-04-18 16:19:02.000000000 +0200
> > > > @@ -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;
> > > >  }
> 

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:23     ` Russell King
  2003-07-08 23:32       ` Pavel Machek
@ 2003-07-08 23:50       ` James Simmons
  1 sibling, 0 replies; 9+ messages in thread
From: James Simmons @ 2003-07-08 23:50 UTC (permalink / raw)
  To: Russell King
  Cc: Pavel Machek, vojtech, Rusty trivial patch monkey Russell,
	kernel list


> > > 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. 
 
> 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 :-)
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:32       ` Pavel Machek
@ 2003-07-08 23:51         ` Russell King
  2003-07-08 23:54           ` James Simmons
  2003-07-08 23:59           ` Patrick Mochel
  0 siblings, 2 replies; 9+ messages in thread
From: Russell King @ 2003-07-08 23:51 UTC (permalink / raw)
  To: Pavel Machek
  Cc: James Simmons, vojtech, Rusty trivial patch monkey Russell,
	kernel list

On Wed, Jul 09, 2003 at 01:32:48AM +0200, Pavel Machek wrote:
> So perhaps we need to add machine_suspend_ram() and
> machine_suspend_disk() to reboot.h? We *do* want to have some generic
> interface...

Sounds good.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:51         ` Russell King
@ 2003-07-08 23:54           ` James Simmons
  2003-07-08 23:59           ` Patrick Mochel
  1 sibling, 0 replies; 9+ messages in thread
From: James Simmons @ 2003-07-08 23:54 UTC (permalink / raw)
  To: Russell King
  Cc: Pavel Machek, vojtech, Rusty trivial patch monkey Russell,
	kernel list


> On Wed, Jul 09, 2003 at 01:32:48AM +0200, Pavel Machek wrote:
> > So perhaps we need to add machine_suspend_ram() and
> > machine_suspend_disk() to reboot.h? We *do* want to have some generic
> > interface...
> 
> Sounds good.

This would be really nice :-) Very handy for PDAs.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Small cleanups for input
  2003-07-08 23:51         ` Russell King
  2003-07-08 23:54           ` James Simmons
@ 2003-07-08 23:59           ` Patrick Mochel
  1 sibling, 0 replies; 9+ messages in thread
From: Patrick Mochel @ 2003-07-08 23:59 UTC (permalink / raw)
  To: Russell King
  Cc: Pavel Machek, James Simmons, vojtech,
	Rusty trivial patch monkey Russell, kernel list


On Wed, 9 Jul 2003, Russell King wrote:

> On Wed, Jul 09, 2003 at 01:32:48AM +0200, Pavel Machek wrote:
> > So perhaps we need to add machine_suspend_ram() and
> > machine_suspend_disk() to reboot.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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-07-08 23:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-24 10:10 Small cleanups for input Pavel Machek
2003-07-08 22:59 ` James Simmons
2003-07-08 23:14   ` Pavel Machek
2003-07-08 23:23     ` Russell King
2003-07-08 23:32       ` Pavel Machek
2003-07-08 23:51         ` Russell King
2003-07-08 23:54           ` James Simmons
2003-07-08 23:59           ` Patrick Mochel
2003-07-08 23:50       ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox