lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vcq1WOcMNoKpOSpCD1mFSyvYsaX-h7KHTaAOPe=6S4e0A@mail.gmail.com>
Date:   Wed, 30 Sep 2020 18:54:50 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Flavio Suligoi <f.suligoi@...m.it>
Cc:     Bartosz Golaszewski <brgl@...ev.pl>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: How to use an ACPI declared GPIO in a userspace ...

On Wed, Sep 30, 2020 at 6:39 PM Flavio Suligoi <f.suligoi@...m.it> wrote:
> > I guess you simply didn't get. The "gpio-line-names" property of GPIO
> > *controller* (provider!) and you are trying to do something with the
> > *consumer*
> > if I got it right.
> >
> > And of course GPIO line, which has name, has no difference in use from
> > another
> > w/o name assigned. You will need to request it by *consumer* either in
> > kernel
> > or in user space.
> >
> > To be more precise we have to look at your DSDT.

^^^^^^^ **DSDT**.

> My SSDT table is:

^^^^ See the difference? I can't help here.

> DefinitionBlock ("gpio_button.aml", "SSDT", 5, "ASEMsp", "GPIO_BTN", 1)
> {
>         External (_SB_.GPO1, DeviceObj)
>
>         Scope (\_SB.GPO1)
>         {
>                 Device (BTNS)
>                 {
>                         Name (_HID, "PRP0001")
>                         Name (_DDN, "GPIO buttons device")
>
>                         Name (_CRS, ResourceTemplate ()
>                         {
>                                 GpioIo (
>                                 Exclusive,               // Not shared
>                                 PullNone,                // No need for pulls
>                                 0,                       // Debounce timeout
>                                 0,                       // Drive strength
>                                 IoRestrictionInputOnly,  // Only used as input
>                                 "\\_SB.GPO1",            // GPIO controller
>                                 0, ResourceConsumer, , ) // Must be 0
>                                 {
>                                         1,              // GPIO number
>                                 }
>                         })
>
>                         Name (_DSD, Package () {
>                                 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>                                 Package () {
>                                         Package () {
>                                                 "gpio-line-names",
>                                                 Package () {
>                                                         "USER_PUSH_BUTTON",
>                                                 }
>                                         },
>                                 }
>                         })
>                 }
>         }
> }
>
> And the kernel messages, after loading the table, are:
>
> ACPI: Host-directed Dynamic ACPI Table Load:
> ACPI: SSDT 0xFFFF908274285200 0000E8 (v05 ASEMsp GPIO_BTN 00000001 INTL 20200717)
> ACPI: \_SB_.GPO1.BTNS: PRP0001 requires 'compatible' property
>
> So I need a "consumer", but I don't want to export the GPIO using its number...
> If you have any suggestion ...

Define "gpio-line-names" property in the *provider* (controller)
device node _DSD().

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ