Help getting ELAN066C touchpad working in Linux

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

 



Hi Dmitry, Hans, input mailing list,

I have two Lenovo 300e laptops, one running Windows and the other
Fedora.  The laptop has a touchscreen, a stylus and a touchpad.  The
touch screen and stylus work perfectly, but, under Fedora, the touchpad
doesn't work at all and isn't detected by the kernel.

The device shows up in /sys/bus/acpi/devices/ELAN066C:00/ with a
modalias of acpi:ELAN066C:PNP0C50:.

I'm not sure if the touchpad should be using elan_i2c or i2c_hid_acpi.
In a somewhat naive attempt to get something to happen, I added:
```
    { "ELAN066C", 0 }, /* Lenovo 100e/300e 2nd gen AMD */
```
to include/linux/input/elan-i2c-ids.h, but the kernel still doesn't
auto-load the module.

I can get elan_i2c to recognize something if I run:
# echo elan_i2c 0x15 > /sys/bus/i2c/devices/i2c-1/new_device 
but the IRQ defaults to 0, and I get an error about an IRQ conflict:

```
[ 2317.791897] i2c i2c-1: delete_device: Deleting device elan_i2c at
0x15
[ 2319.317468] i2c i2c-1: new_device: Instantiated device elan_i2c at
0x15
[ 2319.317662] elan_i2c 1-0015: supply vcc not found, using dummy
regulator
[ 2319.433176] elan_i2c 1-0015: Elan Touchpad: Module ID: 0x00be,
Firmware: 0x0003, Sample: 0x0003, IAP: 0x000e
[ 2319.433184] elan_i2c 1-0015: Elan Touchpad Extra Information:
                   Max ABS X,Y:   3206,1828
                   Width X,Y:   152,152
                   Resolution X,Y:   31,31 (dots/mm)
                   ic type: 0xa
                   info pattern: 0x0
[ 2319.433339] genirq: Flags mismatch irq 0. 00002008 (elan_i2c) vs.
00015a00 (timer)
```

By manually setting the IRQ to an unused value in the driver, I can at
least get the driver to create a new mouse device in /dev/input, but
the touchpad still doesn't work.

At this point, I don't know if I'm really close or barking up the
completely wrong tree.

A bug report from earlier this year about an identical system is at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1976556

Attached is the dsl of the device in ACPI.

I would really appreciate any help in figuring out how to get this
working.  Please let me know if there's anything else you need from me.

Thanks,

Jonathan
Device (TPD0)
{
    Name (_HID, "ELAN066C")  // _HID: Hardware ID
    Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)  // _CID: Compatible ID
    ICMS = 0x0A
    DCMS = 0x01
    ICMS = 0x20
    CDAT = DCMS /* \DCMS */
    If ((CDAT == 0x02))
    {
        _HID = "SYNA2392"
    }

    If ((CDAT == 0x01))
    {
        _HID = "ELAN066C"
    }

    Name (PPRW, Package (0x02)
    {
        0x16, 
        0x03
    })
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
    {
        Return (PPRW) /* \_SB_.I2CD.TPD0.PPRW */
    }

    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        If ((CDAT == 0x00))
        {
            Return (0x00)
        }
        Else
        {
            Return (0x0F)
        }
    }

    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
    {
        If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
        {
            Switch (ToInteger (Arg2))
            {
                Case (0x00)
                {
                    Switch (ToInteger (Arg1))
                    {
                        Case (0x01)
                        {
                            Return (Buffer (0x01)
                            {
                                 0x03                                             // .
                            })
                        }
                        Default
                        {
                            Return (Buffer (0x01)
                            {
                                 0x00                                             // .
                            })
                        }

                    }
                }
                Case (0x01)
                {
                    If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x01))
                    {
                        Return (0x01)
                    }

                    If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x02))
                    {
                        Return (0x20)
                    }
                }
                Default
                {
                    Return (0x00)
                }

            }
        }
        Else
        {
            Return (Buffer (0x01)
            {
                 0x00                                             // .
            })
        }
    }

    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
    {
        Name (SBFG, ResourceTemplate ()
        {
            GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000,
                "\\_SB.GPIO", 0x00, ResourceConsumer, ,
                )
                {   // Pin list
                    0x0009
                }
        })
        If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x01))
        {
            Name (SBFB, ResourceTemplate ()
            {
                I2cSerialBusV2 (0x0015, ControllerInitiated, 0x00061A80,
                    AddressingMode7Bit, "\\_SB.I2CD",
                    0x00, ResourceConsumer, , Exclusive,
                    )
            })
            Return (ConcatenateResTemplate (SBFB, SBFG))
        }

        If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x02))
        {
            Name (SBFC, ResourceTemplate ()
            {
                I2cSerialBusV2 (0x002C, ControllerInitiated, 0x00061A80,
                    AddressingMode7Bit, "\\_SB.I2CD",
                    0x00, ResourceConsumer, , Exclusive,
                    )
            })
            Return (ConcatenateResTemplate (SBFC, SBFG))
        }
    }
}

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux