All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <drew@pdp7.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Drew Fustini <drew@beagleboard.org>,
	Kent Gibson <warthog618@gmail.com>,
	Jason Kridner <jkridner@beagleboard.org>,
	Robert Nelson <robertcnelson@beagleboard.org>
Subject: gpio-omap: add support gpiolib bias (pull-up/down) flags?
Date: Sun, 8 Mar 2020 14:08:04 +0100	[thread overview]
Message-ID: <CAEf4M_Du6Egn-3nZHtSnMMwohc+-DyEdtWU5DqSJi71+nDthFw@mail.gmail.com> (raw)

Hello Grygorii, Santosh and Kevin,

You are listed as gpio-omap maintainers so I wanted to reach out and
get your feedback on this.

The gpiolib userspace API added support for bias flags
(pull-up/pull-down) in Linux 5.5:
[GIT PULL] GPIO changes for v5.5 [1]

The merged code is from the patch series:
[PATCH v6 0/7] gpio: expose line bias flags to userspace [2]

The gpiochip character device now supports theses flags [3]:
GPIOHANDLE_REQUEST_BIAS_PULL_UP
GPIOHANDLE_REQUEST_BIAS_PULL_DOWN
GPIOHANDLE_REQUEST_BIAS_DISABLE

The pinctrl-bcm2835 driver used on Raspberry Pi already supports the
pull-up/down bias flags [4].  pinctrl-bcm2835 is also a gpio driver
[5].  libgpiod v1.5 supports these bias flags [6], so the command line
gpioset utility can set the bias flags for a line on the Raspberry Pi
[7].

I would like the BeagleBone, which has the TI AM3358 SoC, to be able
to use the bias flags as well.   The AM3358 uses the gpio-omap GPIO
driver.  However, gpio-omap does not support these flags [8].

Do you have any feedback on whether this is possible to implement?

If so, do you have any guidance about the correct way for me to add
support for those bias flags in gpio-omap.c?

Thank you,
Drew

[1] https://www.spinics.net/lists/linux-gpio/msg43719.html
[2] https://lore.kernel.org/linux-gpio/CACRpkdbJxcfj6pK=1qjXxffFn0RUH9VD0HRFXX0RoZJDi=hfRw@mail.gmail.com/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpiolib.c#n1061
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/bcm/pinctrl-bcm2835.c#n958
[5] https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
[6] https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?h=v1.5.x&id=26d8d8f0b7bc0e300aaab05c75d5af1b0686af08
[7] https://microhobby.com.br/blog/2020/02/02/new-linux-kernel-5-5-new-interfaces-in-gpiolib/
[8] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpio-omap.c

             reply	other threads:[~2020-03-08 13:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 13:08 Drew Fustini [this message]
2020-03-12 10:43 ` gpio-omap: add support gpiolib bias (pull-up/down) flags? Linus Walleij
2020-03-13  0:39   ` Drew Fustini
2020-03-13  5:23     ` Haojian Zhuang
2020-04-13 12:39       ` Drew Fustini
2020-04-15 13:15         ` Grygorii Strashko
2020-04-15 13:20           ` Robert Nelson
2020-04-15 13:47             ` Grygorii Strashko
2020-04-15 13:59               ` Robert Nelson
2020-04-15 23:37                 ` Drew Fustini
2020-04-16 12:03                   ` Linus Walleij
2020-04-16 16:07                     ` Drew Fustini
2020-04-16 14:16                   ` Grygorii Strashko
2020-04-17 10:37                     ` Linus Walleij
2020-04-16 16:32                   ` Tony Lindgren
2020-04-23 13:17                     ` Drew Fustini
2020-04-23 16:42                       ` Tony Lindgren
2020-04-24 17:32                         ` Drew Fustini
2020-04-24 17:49                           ` Tony Lindgren
2020-05-25 13:17                             ` Drew Fustini

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=CAEf4M_Du6Egn-3nZHtSnMMwohc+-DyEdtWU5DqSJi71+nDthFw@mail.gmail.com \
    --to=drew@pdp7.com \
    --cc=brgl@bgdev.pl \
    --cc=drew@beagleboard.org \
    --cc=grygorii.strashko@ti.com \
    --cc=jkridner@beagleboard.org \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=robertcnelson@beagleboard.org \
    --cc=ssantosh@kernel.org \
    --cc=warthog618@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.