RE: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Flavio Suligoi
HI Andy, > > So, what about adding the following > > > > > > (Replace '...' with meaningful line names or drop for now, but in any > > case you need to provide as much names as lines of such GPIO > > controller) > > I have checked the code, so it allows you to define from 0 up to all > lines,

Re: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Andy Shevchenko
On Fri, Oct 2, 2020 at 3:48 PM Andy Shevchenko wrote: > > On Fri, Oct 2, 2020 at 1:02 PM Flavio Suligoi wrote: > > > > > > My SSDT table is: > > > > > > > > See the difference? I can't help here. > > > > This is the DSDT table related to the GPIO controller of my board: > > > > Device

Re: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Andy Shevchenko
On Fri, Oct 2, 2020 at 1:02 PM Flavio Suligoi wrote: > > > > My SSDT table is: > > > > > > See the difference? I can't help here. > > This is the DSDT table related to the GPIO controller of my board: > > Device (GPO1) > { > Name (_ADR, Zero) // _ADR: Address >

Re: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Andy Shevchenko
On Fri, Oct 2, 2020 at 1:26 PM Flavio Suligoi wrote: > Hi Andy, > > with my custom SSDT table: > > DefinitionBlock ("gpio_button.aml", "SSDT", 5, "ASEMsp", "GPIO_BTN", 1) > { > External (_SB_.GPO1, DeviceObj) > Scope (\_SB.GPO1) > { > Device (BTNS) >

RE: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Flavio Suligoi
Hi Andy, with my custom SSDT table: DefinitionBlock ("gpio_button.aml", "SSDT", 5, "ASEMsp", "GPIO_BTN", 1) { External (_SB_.GPO1, DeviceObj) Scope (\_SB.GPO1) { Device (BTNS) { Name (_HID, "ASEM0005") //

RE: How to use an ACPI declared GPIO in a userspace ...

2020-10-02 Thread Flavio Suligoi
Hi Andy, sorry for the delay! > > > My SSDT table is: > > > > See the difference? I can't help here. This is the DSDT table related to the GPIO controller of my board: Device (GPO1) { Name (_ADR, Zero) // _ADR: Address Name (_HID, "INT3452") // _HID:

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-30 Thread Andy Shevchenko
On Wed, Sep 30, 2020 at 6:54 PM Andy Shevchenko wrote: > On Wed, Sep 30, 2020 at 6:39 PM Flavio Suligoi 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

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-30 Thread Andy Shevchenko
On Wed, Sep 30, 2020 at 6:39 PM Flavio Suligoi 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

RE: How to use an ACPI declared GPIO in a userspace ...

2020-09-30 Thread Flavio Suligoi
Hi Andy, > 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

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-30 Thread Andy Shevchenko
On Wed, Sep 30, 2020 at 12:04:43PM +, Flavio Suligoi wrote: > > > > > > I was wondering if there is a generic GPIO driver that I can use > > Maybe I was not so clear, but as Bart mentioned the least you can do > > is simply define line name via "gpio-line-names" property. The problem > > here

RE: How to use an ACPI declared GPIO in a userspace ...

2020-09-30 Thread Flavio Suligoi
Hi Andy, > > > > > I was wondering if there is a generic GPIO driver that I can use > Maybe I was not so clear, but as Bart mentioned the least you can do > is simply define line name via "gpio-line-names" property. The problem > here is when and how you would like to have them incorporated. I

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-29 Thread Andy Shevchenko
On Tue, Sep 29, 2020 at 7:21 PM Flavio Suligoi wrote: > > > > I need to expose to the userspace a GPIO, physically connected to a > > board > > > > push-button. This GPIO must expose a pre-defined name, such as > > > > "user-push-button", so that the userspace applications can use it > > without

RE: How to use an ACPI declared GPIO in a userspace ...

2020-09-29 Thread Flavio Suligoi
Hi Andy and Bartosz, > > > > > > I need to expose to the userspace a GPIO, physically connected to a > board > > > push-button. This GPIO must expose a pre-defined name, such as > > > "user-push-button", so that the userspace applications can use it > without > > > know any physical GPIO details.

RE: How to use an ACPI declared GPIO in a userspace ...

2020-09-29 Thread Flavio Suligoi
Hi Bartosz, > > I need to expose to the userspace a GPIO, physically connected to a > board > > push-button. This GPIO must expose a pre-defined name, such as > > "user-push-button", so that the userspace applications can use it > without > > know any physical GPIO details. > > > > I can

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-29 Thread Andy Shevchenko
On Tue, Sep 29, 2020 at 6:48 PM Bartosz Golaszewski wrote: > > On Tue, Sep 29, 2020 at 5:43 PM Flavio Suligoi wrote: > > > > Hi all, > > > > I need to expose to the userspace a GPIO, physically connected to a board > > push-button. This GPIO must expose a pre-defined name, such as > >

Re: How to use an ACPI declared GPIO in a userspace ...

2020-09-29 Thread Bartosz Golaszewski
On Tue, Sep 29, 2020 at 5:43 PM Flavio Suligoi wrote: > > Hi all, > > I need to expose to the userspace a GPIO, physically connected to a board > push-button. This GPIO must expose a pre-defined name, such as > "user-push-button", so that the userspace applications can use it without > know any