From: Tony Lindgren <tony@atomide.com>
To: Matthijs Kooijman <matthijs@stdin.nl>,
linux-gpio@vger.kernel.org,
Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Subject: Re: pinctrl: single: Cannot disable bias - PIN_CONFIG_BIAS_DISABLE not handled
Date: Thu, 29 Feb 2024 09:32:11 +0200 [thread overview]
Message-ID: <20240229073211.GB5299@atomide.com> (raw)
In-Reply-To: <Zd8hYYDvvk2Q-GcG@login.tika.stderr.nl>
Hi,
* Matthijs Kooijman <matthijs@stdin.nl> [240228 12:04]:
> While figuring out why bias-setting on the beaglebone black did not
> work, I noticed what looks like a bug in the pinctrl-single driver,
> preventing it from disabling a bias once enabled.
>
> The short version is: It handles pin_config_set by looking up the requested
> setting in a DT-defined lookup table, which defines what bits correspond to
> each setting. For PIN_CONFIG_BIAS_DISABLE, this never works since that setting
> is never defined in the lookup table (so the code that exists to handle this
> setting is never actually executed).
OK
> It seems this code has been broken since it was first introduced in
> commit 9dddb4df90d1 (pinctrl: single: support generic pinconf).
>
> An obvious fix for this would be to lift the handling for
> PIN_CONFIG_BIAS_DISABLE out of the inner loop, running that instead of
> the inner loop in that case.
Maybe post a suggested patch for Haojian to look at?
> Note that I have not verified my analysis of the code by testing. I did
> confirm that if I define the (what I think is) proper DT definitions for
> bias control for the beaglebone black board, I can enable bias, but not
> disable them, but I cannot rule out that that problem has a different
> cause. I also do not have a good toolchain setup for compiling custom
> kernels for this setup (and limited time for setting up one), so I do
> not expect to be able to provide more testing or a patch anytime soon.
The buildall script should allow you to easily build a cross compiler
on pretty much any current Linux host. I think this is the current
git tree for it:
https://github.com/nathanchance/buildall
Seems like buildall should be hosted at kernel.org but I don't know the
details, so adding Nathan to Cc too.
Regards,
Tony
next prev parent reply other threads:[~2024-02-29 7:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 12:04 pinctrl: single: Cannot disable bias - PIN_CONFIG_BIAS_DISABLE not handled Matthijs Kooijman
2024-02-29 7:32 ` Tony Lindgren [this message]
2024-02-29 18:31 ` Nathan Chancellor
2024-02-29 19:07 ` Matthijs Kooijman
2024-03-01 10:04 ` Tony Lindgren
2024-03-19 11:05 ` Matthijs Kooijman
2024-03-19 11:06 ` [PATCH] pinctrl: single: Fix PIN_CONFIG_BIAS_DISABLE handling Matthijs Kooijman
2024-03-28 21:02 ` Linus Walleij
2024-04-03 8:59 ` Tony Lindgren
2024-03-29 2:05 ` Haojian Zhuang
2024-04-04 12:00 ` Linus Walleij
2024-03-22 6:24 ` pinctrl: single: Cannot disable bias - PIN_CONFIG_BIAS_DISABLE not handled Tony Lindgren
2024-03-29 2:06 ` Haojian Zhuang
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=20240229073211.GB5299@atomide.com \
--to=tony@atomide.com \
--cc=haojian.zhuang@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=matthijs@stdin.nl \
--cc=nathan@kernel.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.