public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH v5 0/3] gpio: add possibility to search for gpio label name
Date: Fri, 15 May 2020 16:00:56 +0200	[thread overview]
Message-ID: <20200515140100.3306517-1-hs@denx.de> (raw)

search for gpio label if gpio name from bankname is not found.

This makes sense on boards with different hardware verions. You
can now search for the gpio label name, and can give the gpio
a unique name. The real gpio pin number is not needed in board
code anymore.

while at it add basic gpio hog test functions in seperate patch.

Travis build:
  https://travis-ci.org/github/hsdenx/u-boot-test/builds/687305014

Changes in v5:
- add comment from patrick, update the descriptor flags
  in _dm_gpio_set_dir_flags() if setting direction was OK.

Changes in v4:
- new in version 4
- rebased to current master ac14bc4169
- rebased to current master ac14bc4169

Changes in v3:
- add comment from Simon Glass
  make this new function configurable through Kconfig
  option DM_GPIO_LOOKUP_LABEL

Changes in v2:
- add basic gpio hog test functions
- add comment from Simon Glass
  move code into seperate function dm_gpio_lookup_label()
  add test if dm_gpio_lookup_label() works

Heiko Schocher (3):
  gpio-uclass.c: save the GPIOD flags also in the gpio descriptor
  sandbox, test: add test for GPIO_HOG function
  gpio: search for gpio label if gpio is not found through bank name

 arch/sandbox/dts/test.dts          | 20 +++++++++++
 configs/sandbox64_defconfig        |  1 +
 configs/sandbox_defconfig          |  1 +
 configs/sandbox_flattree_defconfig |  1 +
 configs/sandbox_spl_defconfig      |  1 +
 drivers/gpio/Kconfig               | 22 ++++++++++++
 drivers/gpio/gpio-uclass.c         | 55 +++++++++++++++++++++++++++---
 test/dm/gpio.c                     | 30 ++++++++++++++++
 8 files changed, 127 insertions(+), 4 deletions(-)

-- 
2.24.1

             reply	other threads:[~2020-05-15 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 14:00 Heiko Schocher [this message]
2020-05-15 14:00 ` [PATCH v5 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor Heiko Schocher
2020-05-15 19:36   ` Patrick DELAUNAY
2020-05-20  3:06   ` Simon Glass
2020-07-02 19:05   ` Baruch Siach
2020-07-03  5:10     ` Heiko Schocher
2020-05-15 14:00 ` [PATCH v5 2/3] sandbox, test: add test for GPIO_HOG function Heiko Schocher
2020-05-20  3:06   ` Simon Glass
2020-05-15 14:00 ` [PATCH v5 3/3] gpio: search for gpio label if gpio is not found through bank name Heiko Schocher
2020-05-20  3:06   ` 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=20200515140100.3306517-1-hs@denx.de \
    --to=hs@denx.de \
    --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