Re: [libgpiod] Documentation question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 31, 2023 at 02:17:56AM -0600, Seamus de Mora wrote:
> > On Sat, Dec 30, 2023 at 9:51 PM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > >
> > > On Sat, Dec 30, 2023 at 08:04:40PM -0600, Seamus de Mora wrote:
> > > > Hello,
> > > >
> > >
> > > Cheers,
> > > Kent.
> > >
> > > [1] https://docs.kernel.org/driver-api/pin-control.html
> > > [2] https://docs.kernel.org/driver-api/pin-control.html#gpio-mode-pitfalls
>
> The pinctrl refs didn't have what I was looking for, but thanks & keep
> your eyes peeled, please. I found something close (and a surprise) in
> this item named 'Using GPIO Lines in Linux'[1]. The surprise was the
> recommendation against using the ABI (libgpiod??) for "production
> systems". Am I reading that correctly?
>

The userspace ABI mentioned is the GPIO uAPI, so what libgpiod uses.

It says "don't use it to cut corners", i.e. don't use it when you should
actually be writing a kernel driver for your use case.  If you were
never to use it under any circumstances then neither it nor libgpiod
would even exist.  But there is strong emphasis on not abusing it to
effectively try to write user-space kernel drivers.
Where the exact line is for a particular case is up for debate.

Cheers,
Kent.

> [1] https://www.kernel.org/doc/html/latest/driver-api/gpio/using-gpio.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux