From: Kent Gibson <warthog618@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gasai Maple <gasaimaple@gmail.com>,
linux-gpio@vger.kernel.org, brgl@bgdev.pl
Subject: Re: A problem with gpios on my sunxi board.
Date: Mon, 31 Jan 2022 19:39:37 +0800 [thread overview]
Message-ID: <20220131113937.GA54861@sol> (raw)
In-Reply-To: <YffHbHRJLlF/kJ8F@smile.fi.intel.com>
On Mon, Jan 31, 2022 at 01:26:36PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 31, 2022 at 08:59:24AM +0800, Kent Gibson wrote:
> > On Fri, Jan 28, 2022 at 10:12:13PM +0800, Gasai Maple wrote:
> > > I posted a question on stackoverflow, it's basically about me having
> > > problems operating gpio with libgpiod, and a user advised me to drop a
> > > message, the link is here
> > > https://stackoverflow.com/questions/70863283/libgpiod-tests-fails-on-pcduino3-nano
> >
> > It would be helpful to restate your question rather than providing the
> > link. But anyway...
> >
> > My best guess is that your kernel is built with only v2 of the GPIO CDEV ABI.
> > libgpiod support for v2 is a WIP, and 1.6.3 only supports ABI v1.
> > The CHIP_INFO ioctl is common to both, so will still work.
> > But all the line request ioctls changed so they wont.
> > So libgpiod is probably making ioctl calls that your kernel doesn't
> > support.
>
> If this the case, can we add some warning to libgpiod tools to tell user that
> the results may be way wrong because of that?
>
Turns out not to be the case here, but the results wont be "way wrong"
- the ioctl call will just fail as it doesn't exist in the kernel.
Unfortunately that returns a generic EINVAL that can't be distinquished
from other causes of the same error.
Cheers,
Kent.
prev parent reply other threads:[~2022-01-31 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 14:12 A problem with gpios on my sunxi board Gasai Maple
2022-01-31 0:59 ` Kent Gibson
2022-01-31 2:30 ` Kent Gibson
2022-01-31 11:26 ` Andy Shevchenko
2022-01-31 11:39 ` Kent Gibson [this message]
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=20220131113937.GA54861@sol \
--to=warthog618@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=gasaimaple@gmail.com \
--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).