linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: "Jiří Prchal" <jiri.prchal@aksignal.cz>
Cc: linux-gpio@vger.kernel.org, brgl@bgdev.pl
Subject: Re: [libgpiod] bug: pull-up does not work
Date: Fri, 25 Mar 2022 22:57:42 +0800	[thread overview]
Message-ID: <20220325145742.GA46960@sol> (raw)
In-Reply-To: <62b30818-92fa-e44c-c9dd-fd8cc49a6e6a@aksignal.cz>

On Fri, Mar 25, 2022 at 11:02:07AM +0100, Jiří Prchal wrote:
> Hi,
> since in debian is 1.6.2 and pull-up doesn't work so I cloned git, branch
> next/libgpiod-2.0 and compiled libgpiod and tools, but no luck, same result.
> 

You mean it doesn't work for you on your platform.

The libgpiod-2.0 branch is a work in progress and should not be considered
the place to go to find solutions to problems with v1.6.
Not that I'm saying that the v2 branch doesn't work, I'm actually pretty
sure it does, but its purpose is to switch to the latest kernel uAPI, not
to provide fixes, should they be needed, for v1.6.

> ~# uname -r
> 5.17.0-rc7_cpm9g25
> 
> floating pins should go with pull-up/down
> ~# gpioget -B pull-up 3 6 8 10 12 14 16 18 20
> 0 0 0 0 0 0 0 0
> ~# gpioget -B pull-up 3 6 8 10 12 14 16 18 20
> 1 1 0 0 0 0 0 0
> ~# gpioget -B pull-up 3 6 8 10 12 14 16 18 20
> 0 1 0 1 0 0 0 0
> 
> ~# gpioget -v
> gpioget (libgpiod) v2.0-devel
> 
> Whats wrong with it?

You forgot to mention which of those pins are floating.
Or what gpiochip3 is and whether it supports biasing.

So does your chip support pull-up/down?
The kernel can only enable it if the hardware and pinctrl driver supports it.
If the hardware doesn't support it then attempting to set the
pull-up/down is quietly ignored, which would be consistent with what you
are seeing.

Cheers,
Kent.


  reply	other threads:[~2022-03-25 14:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 10:02 [libgpiod] bug: pull-up does not work Jiří Prchal
2022-03-25 14:57 ` Kent Gibson [this message]
2022-03-25 15:13   ` Jiří Prchal
2022-03-25 16:01     ` Kent Gibson
2022-03-28  7:12       ` Jiří Prchal
2022-03-28  8:08         ` Kent Gibson
2022-03-28  8:58           ` Jiří Prchal
2022-03-28  9:56             ` Kent Gibson
2022-06-28 13:08           ` [libgpiod] feature request: output state read and sustain Jiří Prchal
2022-06-29  7:23             ` Kent Gibson
2022-06-29  9:25               ` Jiří Prchal
2022-06-29 10:10                 ` Kent Gibson
2022-06-29 10:27                 ` Andy Shevchenko
2022-06-29 10:47                   ` Kent Gibson
2022-06-29 10:58                     ` Andy Shevchenko
2022-06-29 11:20                       ` Kent Gibson
2022-06-29 11:55                         ` Andy Shevchenko
2022-06-29 12:56                       ` Bartosz Golaszewski
2022-06-29 15:22                         ` Andy Shevchenko
2022-06-29 11:17                     ` Jiří Prchal
2022-06-29 11:25                       ` Kent Gibson
2022-06-29 11:48                         ` Jiří Prchal
2022-06-29 12:51                           ` Kent Gibson

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=20220325145742.GA46960@sol \
    --to=warthog618@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=jiri.prchal@aksignal.cz \
    --cc=linux-gpio@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).