All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <drew@pdp7.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Jason Kridner <jkridner@beagleboard.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	Kent Gibson <warthog618@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: gpio-omap: add support gpiolib bias (pull-up/down) flags?
Date: Thu, 16 Apr 2020 18:07:38 +0200	[thread overview]
Message-ID: <20200416160738.GA2511@x1> (raw)
In-Reply-To: <CACRpkda_upTeRn7xT9LuAkVKAf8LxUmQJJbVWhOoq+4zyoxfsw@mail.gmail.com>


On Thu, Apr 16, 2020 at 02:03:43PM +0200, Linus Walleij wrote:
> On Thu, Apr 16, 2020 at 1:36 AM Drew Fustini <drew@pdp7.com> wrote:
> 
> > Is there no way for gpio-omap to call into the pinctrl-single backend to
> > set the bias bits (PULLUDEN and PULLTYPESEL) in pad control registers?
> 
> Mostly a Tony question I think, but the single pinconf_ops call
> pcs_pinconf_set() which is pretty straight-forward.
> 
> Have you tried modifying omap_gpio_set_config() so that
> it accepts these configs and just calls down to
> gpiochip_generic_config() for anything that is not debounce?
> 
> Yours,
> Linus Walleij

I did add the plumbing to gpio-omap to call pinctrl_gpio_set_config()
when PIN_CONFIG_BIAS_* is set.  I added lots of debug printing to
pinctrl and determined that the problem was that
pinctrl_get_device_gpio_range() would fail.  This seems to be the result
of there being no gpio-ranges property define in the device tree.  This
makes sense as currently there is no interaction between gpio and
pinctrl subsystems when running on the TI AM3358.

Another issue seems to be that the AM3358 device tree is using
compatible of "pinctrl-single" [0] and the pinctrl-single binding
documentation states this means no pinconf is possible (as opposed to
compatible of "pinconf-single").

I did try switching to "pinconf-single" but it failed to boot
successfully.  I need to troubleshoot more to figure out why that is.
But I am uncertain if "pinconf-single" should in theory work for AM3358.

Thanks,
Drew

[0] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/am33xx-l4.dtsi#L279

  reply	other threads:[~2020-04-16 16:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 13:08 gpio-omap: add support gpiolib bias (pull-up/down) flags? Drew Fustini
2020-03-12 10:43 ` 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 [this message]
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=20200416160738.GA2511@x1 \
    --to=drew@pdp7.com \
    --cc=brgl@bgdev.pl \
    --cc=grygorii.strashko@ti.com \
    --cc=haojian.zhuang@linaro.org \
    --cc=jkridner@beagleboard.org \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robertcnelson@gmail.com \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    --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.