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>,
	"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: Fri, 2 Oct 2020 13:29:06 +0000	[thread overview]
Message-ID: <809e219eabd44f3886af1da853c58db4@asem.it> (raw)
In-Reply-To: <CAHp75VdBJEbm0=eNZMdc2ZWMh4qwP2S7jRECWWWvh2EfA-NykA@mail.gmail.com>

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, but no gaps.
> Thus, I have dropped '...' line in above excerpt, added the compiled
> AML to initramfs (initrd method) and voila!
> 
> % gpioinfo gpiochip1
> gpiochip1 - 77 lines:
>        line   0:      "Line0"       unused   input  active-high
>        line   1:      "Line1"       unused   input  active-high
>        line   2:      "Line2"       unused   input  active-high
>        line   3:      unnamed       unused   input  active-high
> 
> 
> % gpiofind Line2
> gpiochip1 2
> 
> Of course you may convert _DSD to be a Method and fill the line names
> dynamically with help of ASL.

Thanks for your help, I try now!

> 
> --
> With Best Regards,
> Andy Shevchenko

Best regards,

Flavio

  reply	other threads:[~2020-10-02 13:29 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
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 [this message]
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=809e219eabd44f3886af1da853c58db4@asem.it \
    --to=f.suligoi@asem.it \
    --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).