Re: [PATCH v11 0/4] Firmware Support for USB-HID Devices and CP2112

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

 



On Thu, Jun 06, 2024 at 02:42:42AM +0300, Andy Shevchenko wrote:
> On Wed, Jun 05, 2024 at 06:12:43PM -0500, Danny Kaehn wrote:
> > This patchset allows USB-HID devices to have Firmware bindings through sharing
> > the USB fwnode with the HID driver, and adds such a binding and driver
> > implementation for the CP2112 USB to SMBus Bridge (which necessitated the
> > USB-HID change). This change allows a CP2112 permanently attached in hardware to
> > be described in DT and ACPI and interoperate with other drivers.
> 
> ...
> 
> > Changes in v11:
> > - Eliminate 'gpio' subnode for DT and ACPI for the CP2112 per comment
> >     from Rob H.
> 
> Hmm... I don't know much about DT, but how is this supposed to work in ACPI?
> I mean if we want to refer to the GPIO in GpioIo() or GpioInt() resources,
> what should we put there as ACPI path?

What I tested was essentially taking what Benjamin had done in [1], just
removing the "GPIO" device and combining it with the parent device (the
CP2112 itself). So for the example below, I believe the path would be
"\_SB_.PCI0.SE9_.RHUB.CP2_". If I get the chance (and can figure out how
to do it using ACPI) I'll try to add a "gpio-keys" or something to the
system using this path and make sure that works.

[1]: https://patchwork.kernel.org/project/linux-input/patch/20230227140758.1575-4-kaehndan@xxxxxxxxx/#25242036

Thanks,

Danny Kaehn

---

Full example within context:

Device (SE9)
{
    Name (_ADR, 0x001D0001)  // _ADR: Address
    Device (RHUB)
    {
        Name (_ADR, Zero)
        Device (CP2) // the USB-hid & CP2112 shared node
        {
            Name (_ADR, One)
            Name (_STA, 0x0F)
            
            Name (_DSD, Package () {
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package () {
                    Package () { "gpio-hog", 1 },
                    Package () { "gpios", Package () { 4, 0 } },
                    Package () { "output-high", 1 },
                    Package () { "line-name", "gpio4-pullup" },
                },
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package () {
                    Package () { "gpio-line-names", Package () {
                                "",
                                "",
                                "irq-rmi4",
                                "",
                                "power", // set to 1 with gpio-hog above
                                "",
                                "",
                                "",
                                ""}},
                }
            })
            Device (I2C0)
            {
                Name (_ADR, Zero)
                Name (_STA, 0x0F)
            }
        }
    }
}

> 
> > - Edit hid-cp2112.c to match for ACPI index and fall back to matching by
> >     name (instead of the other way around)
> > - Separate CP2112 I2C bus speed configuration into a separate patch
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 




[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