On Wed, Dec 26, 2012 at 06:46:13PM +0100, Richard Hartmann wrote:
> Handle HKEY event generated on AC power change. The current message
> asks users to submit data related to this event which leads to
> a lot of confusion and noise on the mailing list.
> 
> The following is a list of causes, affected models, and 'message-id'
> from ibm-acpi-devel@lists.sourceforge.net :
> 
> AC plug/unplug:
> 
> X120e - caaaujb5v9dhdbdxdvvhnjog4urzc1tgkqeb_zgpay7q8kzh...@mail.gmail.com
> x121e - 20120817143459.gb3...@x1.osrc.amd.com
> X220  - Confirmed by Richard Hartmann
> X220i - 4f406274.7070...@gmail.com
> X220t - 4f489f5b.9040...@cs.tu-berlin.de
> X230  - CAKx4u7kqvVH0-gstomsiVYdGC0i6=bgxzaq8sq9gbg76tgm...@mail.gmail.com
> T420  - 9c848ee30b006737d0534d906bab0...@niklaas-baudet.net
> T420s - 20120608080824.gs25...@hexapodia.org
> W520  - 20121008181050.gf2...@ericlaptop.home.christensenplace.us
> 
> Lid closed/openend:
> 
> X220  - 4f4124df.5030...@gmail.com
>         Could not be confirmed by author
> 
> Signed-off-by: Richard Hartmann <richih.mailingl...@gmail.com>
> ---
>  drivers/platform/x86/thinkpad_acpi.c |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c 
> b/drivers/platform/x86/thinkpad_acpi.c
> index 75dd651..2645084 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -209,9 +209,8 @@ enum tpacpi_hkey_event_t {
>       TP_HKEY_EV_ALARM_SENSOR_XHOT    = 0x6022, /* sensor critically hot */
>       TP_HKEY_EV_THM_TABLE_CHANGED    = 0x6030, /* thermal table changed */
>  
> -     TP_HKEY_EV_UNK_6040             = 0x6040, /* Related to AC change?
> -                                                  some sort of APM hint,
> -                                                  W520 */
> +     /* AC-related events */
> +     TP_HKEY_EV_AC_CHANGED           = 0x6040, /* AC status changed */
>  
>       /* Misc */
>       TP_HKEY_EV_RFKILL_CHANGED       = 0x7000, /* rfkill switch changed */
> @@ -3629,6 +3628,13 @@ static bool hotkey_notify_6xxx(const u32 hkey,
>                        "a sensor reports something is extremely hot!\n");
>               /* recommended action: immediate sleep/hibernate */
>               break;
> +     case TP_HKEY_EV_AC_CHANGED:
> +             pr_info("AC status has changed\n");
> +             /* X120e, x121e, X220, X220i, X220t, X230, T420, T420s, W520:
> +              * AC status changed; can be triggered by plugging or
> +              * unplugging AC adapter, docking or undocking, or closing
> +              * or opening the lid. */
> +             break;

It looks like a pretty useless message to me, AFAICT. If it is only an
APM hint, then we probably shouldn't say anything in dmesg but simply
ignore it.

I mean, do I additionally want to know that I just connected to AC after
I just plugged the cable in? There's this green lamp on the side, doh!
:-)

Thanks.

-- 
Regards/Gruss,
Boris.

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Reply via email to