From: Kent Gibson <warthog618@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hans Kurscheidt <lve0200@gmail.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: gpiod: Set pullup for Input Line
Date: Wed, 23 Mar 2022 00:11:30 +0800 [thread overview]
Message-ID: <20220322161130.GB131091@sol> (raw)
In-Reply-To: <CAHp75Vf_H8cD839CgmkH=9Z5_Gf_y15+=N+B-0jDU6xTuQnGAQ@mail.gmail.com>
On Tue, Mar 22, 2022 at 10:50:30AM +0200, Andy Shevchenko wrote:
> On Tue, Mar 22, 2022 at 10:39 AM Hans Kurscheidt <lve0200@gmail.com> wrote:
> > Am 22.03.2022 um 09:36 schrieb Hans Kurscheidt:
> > > Am 22.03.2022 um 01:59 schrieb Kent Gibson:
>
> ...
>
> > > Still 1 more question. I understand the sense of a Pull-up in Input
> > > mode, but reading the code, I see that the Bias option exists as well
> > > for gpioset (Output). What is the sense of this, and what does it do?
>
> I guess we started providing OPEN SOURCE / DRAIN in libgpiod v2.0
> (Bart or Kent may correct me), but you should get an idea why it may
> be useful.
>
No - open drain/source is not new - it has been there since cdev was added
AFAIAA.
The v2 ABI, which libgpiod v2 will support, adds debounce, event sequence
numbers, events from multiple lines in one request, and a few other
things, but the drive options have always been there - even before the
bias options were added.
> On top of that, the pin can be reconfigured from input to output and
> vice versa at run-time. So, keeping a bias setting will allow not to
> think about it when pin direction is switched, although I agree this
> may not be a clean case to use.
>
Agreed - I would set both the direction and bias in such a case.
Cheers,
Kent.
next prev parent reply other threads:[~2022-03-22 16:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 10:43 gpiod: Set pullup for Input Line Hans Kurscheidt
2022-03-21 13:34 ` Alexander Dahl
2022-03-21 16:26 ` Andy Shevchenko
2022-03-21 17:27 ` Hans Kurscheidt
2022-03-21 17:33 ` Andy Shevchenko
2022-03-21 18:17 ` Hans Kurscheidt
2022-03-21 20:25 ` Fwd: " Hans Kurscheidt
2022-03-22 0:59 ` Kent Gibson
[not found] ` <1a7fd31a-221e-7b23-b95f-d71e440b3ff0@gmail.com>
2022-03-22 8:39 ` Hans Kurscheidt
2022-03-22 8:50 ` Andy Shevchenko
2022-03-22 9:39 ` Hans Kurscheidt
2022-03-22 16:12 ` Kent Gibson
2022-03-22 16:11 ` Kent Gibson [this message]
2022-03-22 16:11 ` Kent Gibson
[not found] <ab3240e5-df61-cff4-ebba-f6a7e5d99f52@gmail.com>
2022-03-21 13:48 ` Hans Kurscheidt
2022-03-21 14:42 ` Alexander Dahl
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=20220322161130.GB131091@sol \
--to=warthog618@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linux-gpio@vger.kernel.org \
--cc=lve0200@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 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).