X86 platform drivers
 help / color / mirror / Atom feed
From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] acer-wmi: deactive mail led when power off
Date: Sun, 27 Feb 2011 10:29:04 +0000	[thread overview]
Message-ID: <201102271029.05177.carlos@strangeworlds.co.uk> (raw)
In-Reply-To: <AANLkTinMFGRJkcLgLgNgf7M4fe1yyNJVeqJdX8qh=hec@mail.gmail.com>

On Saturday 26 Feb 2011 20:18:58 Pali Rohár wrote:
> This patch deactive mail led when laptop is going to hibernete/suspend
> or power off. After resume from hibernate/suspend correctly restore
> mail led state.
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

> Tested-by: Pali Rohár <pali.rohar@gmail.com>
> 
> --- a/drivers/platform/x86/acer-wmi.c/acer-wmi.c	2011-01-30
> 00:28:04.000000000 +0100
> +++ b/drivers/platform/x86/acer-wmi.c/acer-wmi.c	2011-01-30
> 01:30:02.000000000 +0100
> @@ -887,6 +887,7 @@ static int __devinit acer_led_init(struc
> 
>  static void acer_led_exit(void)
>  {
> +	set_u32(LED_OFF, ACER_CAP_MAILLED);
>  	led_classdev_unregister(&mail_led);
>  }
> 
> @@ -1166,6 +1167,7 @@ pm_message_t state)
> 
>  	if (has_cap(ACER_CAP_MAILLED)) {
>  		get_u32(&value, ACER_CAP_MAILLED);
> +		set_u32(LED_OFF, ACER_CAP_MAILLED);
>  		data->mailled = value;
>  	}
> 
> @@ -1193,6 +1195,17 @@ static int acer_platform_resume(struct p
>  	return 0;
>  }
> 
> +static void acer_platform_shutdown(struct platform_device *device)
> +{
> +	struct acer_data *data = &interface->data;
> +
> +	if (!data)
> +		return;
> +
> +	if (has_cap(ACER_CAP_MAILLED))
> +		set_u32(LED_OFF, ACER_CAP_MAILLED);
> +}
> +
>  static struct platform_driver acer_platform_driver = {
>  	.driver = {
>  		.name = "acer-wmi",
> @@ -1202,6 +1215,7 @@ static struct platform_driver acer_platf
>  	.remove = acer_platform_remove,
>  	.suspend = acer_platform_suspend,
>  	.resume = acer_platform_resume,
> +	.shutdown = acer_platform_shutdown,
>  };
> 
>  static struct platform_device *acer_platform_device;
> 
> 
> --
> Pali Rohár
> pali.rohar@gmail.com

  reply	other threads:[~2011-02-27 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26 20:18 [PATCH] acer-wmi: deactive mail led when power off Pali Rohár
2011-02-27 10:29 ` Carlos Corbacho [this message]
2011-03-11 17:30 ` Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201102271029.05177.carlos@strangeworlds.co.uk \
    --to=carlos@strangeworlds.co.uk \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox