linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Flavio Suligoi <f.suligoi@asem.it>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: How to use an ACPI declared GPIO in a userspace ...
Date: Wed, 30 Sep 2020 12:04:43 +0000	[thread overview]
Message-ID: <22753b53cd7d4dfba4ef3610f71cc462@asem.it> (raw)
In-Reply-To: <CAHp75Vdd2QjvJvLGHa1x=RaSknEG+O+YB4eJA6+2htnZ=Gf52g@mail.gmail.com>

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 already tried adding the "gpio-line-names" property, but the problem
is the same: no driver asks for this GPIO, as shown by the following
kernel messages:

ACPI: Host-directed Dynamic ACPI Table Load:
ACPI: SSDT 0xFFFF994034D42A00 0000E8 (v05 ASEMsp GPIO_BTN 00000001 INTL 20200717)
ACPI: \_SB_.GPO1.BTNS: PRP0001 requires 'compatible' property

So I'll start to write a simple device driver to use this GPIO.
I'll keep you informed!
 
> When: if ACPI tables are being provided by firmware which you may not
> alter, then you must use initramfs type of solution (no configfs,
> don't know about EFI var though). How: In that case you might have a
> chance to incorporate _DSD() method into *existing* _CRS() one.
> Possible impediments: if ACPI table from firmware already has a _DSD()
> defined or above is not working for some reason. In such a case you
> must upgrade entire DSDT via initramfs.
> 
> > > > Adding Andy who knows ACPI GPIO well.
> > >
> > > Thanks.
> > >
> > > > In general, the "gpio-line-names" property is used for that and it's
> > > > supported both for device tree as well as ACPI, although I have only
> > > > ever used the former.
> > >
> > > Right. ACPI supports properties via _DSD() method.
> 
> --
> With Best Regards,
> Andy Shevchenko

Thanks Andy and Bartosz for your support!
Best regards,

Flavio

  reply	other threads:[~2020-09-30 12:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 15:37 How to use an ACPI declared GPIO in a userspace Flavio Suligoi
2020-09-29 15:47 ` Bartosz Golaszewski
2020-09-29 16:10   ` Andy Shevchenko
2020-09-29 16:21     ` Flavio Suligoi
2020-09-29 16:27       ` Andy Shevchenko
2020-09-30 12:04         ` Flavio Suligoi [this message]
2020-09-30 13:01           ` Andy Shevchenko
2020-09-30 15:39             ` Flavio Suligoi
2020-09-30 15:54               ` Andy Shevchenko
2020-09-30 16:10                 ` Andy Shevchenko
2020-10-02 10:02                   ` Flavio Suligoi
2020-10-02 12:48                     ` Andy Shevchenko
2020-10-02 13:23                       ` Andy Shevchenko
2020-10-02 13:29                         ` Flavio Suligoi
2020-10-02 10:26                   ` Flavio Suligoi
2020-10-02 12:40                     ` Andy Shevchenko
2020-09-29 16:10   ` Flavio Suligoi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22753b53cd7d4dfba4ef3610f71cc462@asem.it \
    --to=f.suligoi@asem.it \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).