All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] gpio: of: Support SPI nonstandard GPIO properties
Date: Mon, 8 Jan 2018 09:22:52 -0600	[thread overview]
Message-ID: <CAL_JsqKDObQZQ=GNYvZT013bu_gZvdJVDEP64ujdNC0CowEg=A@mail.gmail.com> (raw)
In-Reply-To: <20180108150221.14193-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On Mon, Jan 8, 2018 at 9:02 AM, Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> Before it was clearly established that all GPIO properties in the
> device tree shall be named "foo-gpios" (with the deprecated variant
> "foo-gpio" for single lines) we unfortunately merged a few bindings
> which named the lines "gpio-foo" instead.
>
> This is most prominent in the GPIO SPI driver in Linux which names
> the lines "gpio-sck", "gpio-mosi" and "gpio-miso".
>
> As we want to switch the GPIO SPI driver to using descriptors, we
> need devm_gpiod_get() to return something reasonable when looking
> up these in the device tree.
>
> Put in a special #ifdef:ed kludge to do this special lookup only
> for the SPI case and gets compiled out if we're not enabling SPI.
> If we have more oddly defined legacy GPIOs like this, they can be
> handled in a similar manner.
>
> Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> ChangeLog v2->v3:
> - Put the if(!IS_ENABLED()) inside the SPI GPIO retrieveal function
>   and rely on the compiler to stub out unused code.
> ChangeLog v1->v2:
> - Us if IS_ENABLED(CONFIG_SPI_MASTER) instead of
>   #ifdef CONFIG_SPI_MASTER
> ---
>  drivers/gpio/gpiolib-of.c | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)

Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2018-01-08 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 15:02 [PATCH v3] gpio: of: Support SPI nonstandard GPIO properties Linus Walleij
     [not found] ` <20180108150221.14193-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-08 15:22   ` Rob Herring [this message]

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='CAL_JsqKDObQZQ=GNYvZT013bu_gZvdJVDEP64ujdNC0CowEg=A@mail.gmail.com' \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.