Skip to contentSkip to conversation

platform/x86: asus-nb-wmi: Ignore unknown event 0xCF

RFC PATCH In review Armin Wolf 3 participants 4 messages Nov 23, 2024 – Dec 2, 2024

Subsystems (2)
lore
Share & tools
lore

Armin Wolf

author
#0 lore raw

RFC PATCH 1/1 platform/x86: asus-nb-wmi: Ignore unknown event 0xCF

On the Asus X541UAK an unknown event 0xCF is emited when the charger is plugged in. This is caused by the following AML code:

    If (ACPS ())
    {
        ACPF = One
        Local0 = 0x58
        If (ATKP)
        {
            ^^^^ATKD.IANE (0xCF)
        }
    }
    Else
    {
        ACPF = Zero
        Local0 = 0x57
    }

    Notify (AC0, 0x80) // Status Change
    If (ATKP)
    {
        ^^^^ATKD.IANE (Local0)
    }

    Sleep (0x64)
    PNOT ()
    Sleep (0x0A)
    NBAT (0x80)

Ignore the 0xCF event to silence the unknown event warning.

---
 drivers/platform/x86/asus-nb-wmi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/asus-nb-wmi.c +1 -0
index ef04d396f61c..a5933980ade3 100644
@@ -623,6 +623,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
 	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
 	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
 	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
+	{ KE_IGNORE, 0xCF, },	/* AC mode */
 	{ KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */
 	{ KE_KEY, 0xBD, { KEY_PROG2 } },           /* Lid flip action on ROG xflow laptops */
 	{ KE_END, 0},

--
2.39.5

Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 29 lines · Armin Wolf

On the Asus X541UAK an unknown event 0xCF is emited when the charger is plugged in. This is caused by the following AML code:

    If (ACPS ())
    {
        ACPF = One
        Local0 = 0x58
        If (ATKP)
        {
            ^^^^ATKD.IANE (0xCF)
        }
    }
    Else
    {
        ACPF = Zero
        Local0 = 0x57
    }

    Notify (AC0, 0x80) // Status Change
    If (ATKP)
    {
        ^^^^ATKD.IANE (Local0)
    }

    Sleep (0x64)
    PNOT ()
    Sleep (0x0A)
    NBAT (0x80)
Quoted 5 lines

Ignore the 0xCF event to silence the unknown event warning.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 19 lines
---
 drivers/platform/x86/asus-nb-wmi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/asus-nb-wmi.c +1 -1
index ef04d396f61c..a5933980ade3 100644
@@ -623,6 +623,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
 	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
 	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
 	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
+	{ KE_IGNORE, 0xCF, },	/* AC mode */
 	{ KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */
 	{ KE_KEY, 0xBD, { KEY_PROG2 } },           /* Lid flip action on ROG xflow laptops */
 	{ KE_END, 0},
--

2.39.5

author
#2 lore raw

Am 25.11.24 um 10:39 schrieb Hans de Goede:

Quoted 37 lines

Hi,

Quoted 29 lines · Armin Wolf

On the Asus X541UAK an unknown event 0xCF is emited when the charger is plugged in. This is caused by the following AML code:

     If (ACPS ())
     {
         ACPF = One
         Local0 = 0x58
         If (ATKP)
         {
             ^^^^ATKD.IANE (0xCF)
         }
     }
     Else
     {
         ACPF = Zero
         Local0 = 0x57
     }

     Notify (AC0, 0x80) // Status Change
     If (ATKP)
     {
         ^^^^ATKD.IANE (Local0)
     }

     Sleep (0x64)
     PNOT ()
     Sleep (0x0A)
     NBAT (0x80)
Quoted 5 lines

Ignore the 0xCF event to silence the unknown event warning.

Quoted 7 lines

Thanks, patch looks good to me:

Regards,

Hans

Any updates on this?

Thanks,
Armin Wolf

Quoted 19 lines
Quoted 19 lines
---
  drivers/platform/x86/asus-nb-wmi.c | 1 +
  1 file changed, 1 insertion(+)
drivers/platform/x86/asus-nb-wmi.c +1 -1
index ef04d396f61c..a5933980ade3 100644
@@ -623,6 +623,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
  	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
  	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
  	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
+	{ KE_IGNORE, 0xCF, },	/* AC mode */
  	{ KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */
  	{ KE_KEY, 0xBD, { KEY_PROG2 } },           /* Lid flip action on ROG xflow laptops */
  	{ KE_END, 0},
--

2.39.5

maintainer
#3 lore raw
In reply to Armin Wolf
Quoted 18 lines · Armin Wolf

On the Asus X541UAK an unknown event 0xCF is emited when the charger is plugged in. This is caused by the following AML code:

    If (ACPS ())
    {
        ACPF = One
        Local0 = 0x58
        If (ATKP)
        {
            ^^^^ATKD.IANE (0xCF)
        }
    }
    Else
    {
        ACPF = Zero
        Local0 = 0x57
    }
Quoted 1 line

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: asus-nb-wmi: Ignore unknown event 0xCF

      commit: e9fba20c29e27dc99e55e1c550573a114561bf8c

--
i.