Tablet mode on L13 Yoga Gen 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



..resend in plaintext, apologies if this is the second copy you are reading.

Hello,

I'd like to say first, thanks for the support of thinkpads in linux.
As a kernel maintainer, I understand this is a lot of work and I
appreciate you doing a fine job with supporting the hardware.

I am working on patching the thinkpad_acpi driver to support the
keyboard rotation and keyboard lock-out in tablet mode for the L13
Yoga Gen 3.  I believe it needs just one bit extra to get working and
I'm struggling to figure out how to do what I believe is necessary.

It looks like _SB.PCI0.LPC0.EC0.CMMD needs an initial value of 0x01 to
0x06, but I don't see a way to trigger this to happen.  Alternatively,
is there a way to write PMMD?

Right now, I get the following message on boot:
thinkpad_acpi: Unknown/reserved multi mode value 0x0000 for type 4,
please report this to ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx

It looks like the value of 0 indicates that the keyboard rotate
monitoring is disabled, but I cannot seem to find an ACPI table way of
modifying EC0's contents (or set CMMD/PMMD)

The functions of interest seem to be as follows:
                    Method (_Q2E, 0, NotSerialized)  // _Qxx: EC
Query, xx=0x00-0xFF
                    {
                        Local0 = CMMD /* \_SB_.PCI0.LPC0.EC0_.CMMD */
                        If (((Local0 != 0x00) && (Local0 <= 0x06)))
                        {
                            If ((Local0 != PMMD))
                            {
                                PMMD = Local0
                                ^HKEY.MHKQ (0x60C0)
                                If ((PMMD >= 0x04))
                                {
                                    WFIO (0x0B, 0x01)
                                }
                                ElseIf (CPLS)
                                {
                                    WFIO (0x0B, 0x00)
                                }
                                Else
                                {
                                    WFIO (0x0B, 0x01)
                                }
                            }
                        }

                        If (((Local0 == 0x00) || (Local0 >= 0x07)))
                        {
                            Local1 = 0x01
                        }
                        ElseIf (((Local0 == 0x02) || (Local0 ==
0x03)))
                        {
                            Local1 = 0x02
                        }
                        Else
                        {
                            Local1 = 0x03
                        }

                        If ((Local1 != LVMD))
                        {
                            LVMD = Local1
                            Sleep (0x0A)
                            ^HKEY.MHKQ (0x60F0)
                        }
                    }
... and ...
                        Method (GMMS, 1, NotSerialized)
                        {
                            Local0 = 0x00040000
                            Local1 = PMMD /* \PMMD */
                            If ((Local1 >= 0x06))
                            {
                                Local0 |= 0x03
                            }
                            ElseIf ((Local1 >= 0x05))
                            {
                                Local0 |= 0x05
                            }
                            ElseIf ((Local1 >= 0x04))
                            {
                                Local0 |= 0x04
                            }
                            ElseIf ((Local1 >= 0x03))
                            {
                                Local0 |= 0x02
                            }
                            ElseIf ((Local1 >= 0x01))
                            {
                                Local0 |= 0x01
                            }

                            Return (Local0)
                        }
...
and this portion of the _WAK code:
        PMMD = \_SB.PCI0.LPC0.EC0.CMMD
        If ((PMMD >= 0x07))
        {
            PMMD = 0x00
        }

        LVMD = \_SB.PCI0.LPC0.EC0.CMMD
        If (((LVMD == 0x00) || (LVMD >= 0x07)))
        {
            LVMD = 0x01
        }
        ElseIf (((LVMD == 0x02) || (LVMD == 0x03)))
        {
            LVMD = 0x02
        }
        Else
        {
            LVMD = 0x03
        }


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux