From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 13/21] gpio: add support of new GPIO direction flag
Date: Fri, 17 Apr 2020 17:06:58 -0400 [thread overview]
Message-ID: <20200417210658.GT4555@bill-the-cat> (raw)
In-Reply-To: <20200113103515.20879-14-patrick.delaunay@st.com>
On Mon, Jan 13, 2020 at 11:35:07AM +0100, Patrick Delaunay wrote:
> This commit manages the new dir flags that can be used in gpio
> specifiers to indicate the pull-up or pull-down resistor
> configuration for output gpio (GPIO_PULL_UP, GPIO_PULL_DOWN)
> or the Open Drain/Open Source configuration for input gpio
> (GPIO_OPEN_DRAIN, GPIO_OPEN_SOURCE).
>
> These flags are already supported in Linux kernel in gpio lib.
>
> This patch only parse and save the direction flags in GPIO
> descriptor (desc->flags), it prepares the introduction of new ops
> to manage them.
> The GPIO uclass supports new GPIO flags from device-tree
> (GPIO_XXX define in include/dt-bindings/gpio/gpio.h)
> and translate them in the dir flags (GPIOD_XXX):
> - GPIO_PULL_UP => GPIOD_PULL_UP
> - GPIO_PULL_DOWN => GPIOD_PULL_DOWN
> - GPIO_OPEN_DRAIN => GPIOD_OPEN_DRAIN
> - GPIO_OPEN_SOURCE => GPIOD_OPEN_SOURCE
>
> This patch also adds protection in the check_dir_flags function for
> new invalid configuration of the dir flags.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200417/5c18f39d/attachment.sig>
next prev parent reply other threads:[~2020-04-17 21:06 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 10:34 [PATCH v3 00/21] dm: add support of new binding in gpio and pincontrol Patrick Delaunay
2020-01-13 10:34 ` [PATCH v3 01/21] dm: pinctrl: convert pinctrl-single to livetree Patrick Delaunay
2020-04-17 21:05 ` Tom Rini
2020-04-22 16:27 ` Tom Rini
2020-04-22 17:29 ` Lokesh Vutla
2020-01-13 10:34 ` [PATCH v3 02/21] dm: core: add ofnode and dev function to iterate on node property Patrick Delaunay
2020-01-30 2:17 ` Simon Glass
2020-04-17 21:05 ` Tom Rini
2020-01-13 10:34 ` [PATCH v3 03/21] dm: pinctrl: migrate pinctrl-generic to livetree Patrick Delaunay
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:34 ` [PATCH v3 04/21] dt-bindings: gpio: document the new pull-up/pull-down flags Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:34 ` [PATCH v3 05/21] gpio: remove GPIOD_REQUESTED Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 06/21] gpio: remove the open_drain API and ops Patrick Delaunay
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 07/21] gpio: add gpio descriptor initialization helper Patrick Delaunay
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 08/21] gpio: add function _gpio_get_value Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 09/21] gpio: add function _dm_gpio_set_dir_flags Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 10/21] gpio: add function check_dir_flags Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 11/21] gpio: add helper GPIOD_FLAGS_OUTPUT Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 12/21] gpio: update dir_flags management Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 13/21] gpio: add support of new GPIO direction flag Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:06 ` Tom Rini [this message]
2020-01-13 10:35 ` [PATCH v3 14/21] gpio: add ops to get dir flags Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 15/21] gpio: add ops to set " Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 16/21] dt-bindings: gpio: alignment with kernel v5.3 Patrick Delaunay
2020-01-30 2:18 ` Simon Glass
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 17/21] pinctrl: sandbox: Add mux information in get_pin_muxing Patrick Delaunay
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 18/21] test: dm: update test for pins configuration in pinctrl node Patrick Delaunay
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 19/21] gpio: sandbox: cleanup binding support Patrick Delaunay
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 20/21] test: dm: update test for pins configuration in gpio Patrick Delaunay
2020-04-17 21:07 ` Tom Rini
2020-01-13 10:35 ` [PATCH v3 21/21] test: pinmux: add pincontrol-gpio for pin configuration Patrick Delaunay
2020-04-17 21:07 ` Tom Rini
2020-03-27 19:21 ` [PATCH v3 00/21] dm: add support of new binding in gpio and pincontrol Tom Rini
2020-03-27 19:44 ` Simon Glass
2020-03-28 20:04 ` Simon Glass
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=20200417210658.GT4555@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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