All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>,
	Linux Input <linux-input@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH 2/2] gpiolib: add support for fetching descriptors from static properties
Date: Mon, 29 Jul 2019 00:15:07 +0200	[thread overview]
Message-ID: <CACRpkdYLLYbcvi89LGeTSu-qXxM=sxrwYFniJwDW1-9BtODWrw@mail.gmail.com> (raw)
In-Reply-To: <20190713075259.243565-3-dmitry.torokhov@gmail.com>

On Sat, Jul 13, 2019 at 9:53 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:

> Now that static device properties understand notion of child nodes, let's
> teach gpiolib to tie such children and machine GPIO descriptor tables.
> We will continue using a single table for entire device, but instead of
> using connection ID as a lookup key in the GPIO descriptor table directly,
> we will perform additional translation: fwnode_get_named_gpiod() when
> dealing with property_set-backed fwnodes will try parsing string property
> with name matching connection ID and use result of the lookup as the key in
> the table:
>
> static const struct property_entry dev_child1_props[] __initconst = {
>         ...
>         PROPERTY_ENTRY_STRING("gpios",          "child-1-gpios"),
>         { }
> };
>
> static struct gpiod_lookup_table dev_gpiod_table = {
>         .dev_id = "some-device",
>         .table = {
>                 ...
>                 GPIO_LOOKUP_IDX("B", 1, "child-1-gpios", 1, GPIO_ACTIVE_LOW),
>                 ...
>         },
> };
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

I'm pretty grateful for this since I think at one point I provoked this whole
series. :)

> +static struct gpio_desc *__fwnode_get_named_gpiod(struct fwnode_handle *fwnode,

I am allergic to __underscore_with_unclear_semantics() so I will
change this when applying to something with meaning (I even
like "inner_" better.)

Otherwise it's good to go when I get an ACK on the first patch.

Yours,
Linus Walleij

  reply	other threads:[~2019-07-28 22:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13  7:52 [PATCH 0/2] Make gpiolib work with static device properties Dmitry Torokhov
2019-07-13  7:52 ` [PATCH 1/2] drivers: base: swnode: link devices to software nodes Dmitry Torokhov
2019-07-28 22:11   ` Linus Walleij
2019-07-29  9:26     ` Rafael J. Wysocki
2019-07-29 12:07   ` Heikki Krogerus
2019-07-29 13:15     ` Dmitry Torokhov
2019-07-30 11:52       ` Heikki Krogerus
2019-07-30 14:49         ` Rafael J. Wysocki
2019-07-31 13:54           ` Dmitry Torokhov
2019-07-13  7:52 ` [PATCH 2/2] gpiolib: add support for fetching descriptors from static properties Dmitry Torokhov
2019-07-28 22:15   ` Linus Walleij [this message]
2019-07-30 11:30   ` Heikki Krogerus

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='CACRpkdYLLYbcvi89LGeTSu-qXxM=sxrwYFniJwDW1-9BtODWrw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=info@metux.net \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.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.