All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: sergk sergk2mail <sergk.admin@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Aaron Lu <aaron.lu@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Vincent Pelletier <plr.vincent@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Linux Input <linux-input@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 3/3] input: gpio_keys: Make use of the device property API
Date: Wed, 9 Mar 2016 10:36:08 +0700	[thread overview]
Message-ID: <CACRpkdb2vwjcpvOdmn36u_ESpapoc7_BPGOVFGKfsRmW_Q2cQA@mail.gmail.com> (raw)
In-Reply-To: <20160301075241.GD1794@lahna.fi.intel.com>

On Tue, Mar 1, 2016 at 2:52 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Mon, Feb 29, 2016 at 04:24:16PM +0000, sergk sergk2mail wrote:

>> But how then to obtain gpio name or if it is possible the list of all
>> available names?
>> For example decoded ACPI DSDT shows the following:
>> how to get gpio name for mentioned in your reply function?
>
> For existing systems that do not provide _DSD naming for GPIOs you still
> can provide them in the driver itself (ugly but works). See
> Documentation/acpi/gpio-properties.txt chapter "ACPI GPIO Mappings
> Provided by Drivers".

I just this merge window added an ABI for userspace to read name
of the GPIO line and also consumer name ("label") by using the
two strings stored in struct gpio_desc.

Currently this will be initialized per-offset from the seldom used
char names[] in struct gpio_chip, if not NULL.

We're working on DT bindings to set this per-line from the DT, and
if ACPI has a mechanism to name individual lines, please submit
patches for assigning this properly! (Hi Mika ;)

For consumers struct gpio_desc is opaque, but if they actually need
to know the name of a line we can add gpiod_get_name(struct gpio_desc *)
but then I want to know a usecase. debugfs and userspace ABI is
already displaying it just fine.

Yours,
Linus Walleij

  reply	other threads:[~2016-03-09  3:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 10:16 [PATCH 0/3] input: gpio_keys: Convert to GPIO descriptors Geert Uytterhoeven
2016-02-19 10:16 ` [PATCH 1/3] input: gpio_keys: Add support for " Geert Uytterhoeven
2016-02-19 10:16 ` [PATCH 2/3] input: gpio_keys: Switch from irq_of_parse_and_map() to platform_get_irq() Geert Uytterhoeven
2016-02-23 19:35   ` Dmitry Torokhov
2016-02-19 10:16 ` [PATCH 3/3] input: gpio_keys: Make use of the device property API Geert Uytterhoeven
2016-02-19 10:46   ` Geert Uytterhoeven
2016-02-22 19:58   ` Dmitry Torokhov
2016-02-23  7:29     ` Mika Westerberg
2016-02-23 17:54       ` Dmitry Torokhov
2016-02-28  2:03     ` sergk sergk2mail
2016-02-29  8:17       ` Mika Westerberg
2016-02-29 16:24         ` sergk sergk2mail
2016-03-01  7:52           ` Mika Westerberg
2016-03-09  3:36             ` Linus Walleij [this message]
2016-03-09  8:36               ` Mika Westerberg

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=CACRpkdb2vwjcpvOdmn36u_ESpapoc7_BPGOVFGKfsRmW_Q2cQA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=aaron.lu@intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gnurou@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=plr.vincent@gmail.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sergk.admin@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.