cvs commit: src/sys/dev/acpi_support acpi_panasonic.c

Nate Lawson nate at root.org
Mon Jun 5 15:22:03 UTC 2006


Takahashi Yoshihiro wrote:
> nyan        2006-06-05 11:55:20 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/dev/acpi_support acpi_panasonic.c 
>   Log:
>   Add Fn+F7 hotkey (suspend) support.
>   
>   Tested by:      nork
>   
>   Revision  Changes    Path
>   1.10      +7 -0      src/sys/dev/acpi_support/acpi_panasonic.c
> 
> 
> Index: src/sys/dev/acpi_support/acpi_panasonic.c
> diff -u src/sys/dev/acpi_support/acpi_panasonic.c:1.9 src/sys/dev/acpi_support/acpi_panasonic.c:1.10
> --- src/sys/dev/acpi_support/acpi_panasonic.c:1.9	Sun Sep 11 18:39:00 2005
> +++ src/sys/dev/acpi_support/acpi_panasonic.c	Mon Jun  5 11:55:20 2006
> @@ -450,6 +453,10 @@
>  			arg = 1;
>  		hkey_sound_mute(h, HKEY_SET, &arg);
>  		break;
> +	case 7:
> +		/* Suspend. */
> +		acpi_SetSleepState(acpi_sc, ACPI_STATE_S3);
> +		break;
>  	}
>  }
>  

Actually, the method to use should be the same as acpi_button.  Example:

     acpi_event_sleep_button_sleep(acpi_sc);

This allows the sleep state to be configured via sysctl and is the 
normal entry point.

Thanks,
-- 
Nate



More information about the cvs-src mailing list