On Sun, Oct 31, 2021 at 11:30:30PM +0100, Bastian Germann wrote:
On Thu, 30 Sep 2021 18:30:18 +0200 Bastian Germann <b...@debian.org> wrote:
Control: tags -1 moreinfo
On Thu, 24 Jun 2021 14:31:00 +0100 Dave Jones <d...@waveform.org.uk> wrote:
Changes for the initial release:
> lg-gpio (0.1.7.0-1) UNRELEASED; urgency=medium
.
* Initial Debian release.
You have to close an ITP bug with this. I did not find a RFP or ITP
bug for this package name in the wnpp pseudo package. So please
create one and change your changelog accordingly. Also, your package
should target experimental or unstable.
Ah, I'll get on with fixing this, thanks!
Also, please explain how you would justify the introduction of this lib
to Debian when there is libgpiod already.
Certainly -- the TL;DR version is: because libgpiod doesn't provide all
the facilities required to replace the "legacy" GPIO interfaces
currently popular on platforms like the Raspberry Pi, while lg-gpio
does.
The longer version is:
To be a viable replacement for the legacy GPIO interfaces (on which,
more below), any new interface needs to support the facilities of the
legacy interfaces. Unfortunately, libgpiod provides no means to perform
PWM (in software or otherwise) which makes it an unattractive
replacement for the legacy interfaces. lg-gpio, which is still based on
the new gpiochip devices, provides this (and quite a few other bits
besides).
On the Raspberry Pi (and a few other Pi-like platforms) there are
currently a few popular libraries for manipulating the GPIO pins from
userspace:
RPi.GPIO -- probably the most popular library, currently in Raspberry Pi
OS, Debian, and Ubuntu. This is a "legacy" library in that it (mostly)
bangs directly on the GPIO registers, (mostly) bypassing the kernel.
Various clones of this library exist for other Pi-like platforms, but
I'm not sure any of those clones exist in Debian, and they're probably
not an attractive idea anyway given that things should be moving towards
using gpiochip (like libgpiod and lg-gpio).
pigpiod -- probably the second most popular library, currently in
Raspberry Pi OS only. Also bangs directly on the GPIO registers but
(unlike RPi.GPIO) doesn't require clients to have root authority or
access to those registers directly (via something like /dev/gpiomem) as
clients talk to a (root) daemon over a socket instead (which also
provides the option for remote control of GPIO pins, if the socket is
bound to something other than localhost). Provides a form of hardware
PWM (DMA controller banging on the GPIO registers) which is attractive
to anyone wanting perfect servo control (for example), without
additional hardware. However, it is *very* architecture specific:
strictly Raspberry Pi only, and armhf only.
gpiozero -- a high level library providing "device" interfaces (for
LEDs, buttons, motors, servos, rotary controllers, etc). Exists in
Raspberry Pi OS, Debian, and Ubuntu (full disclosure: I'm one of the
developers on this project). This sits on top of "pin drivers" like
RPi.GPIO, pigpiod, or lg-gpio. I haven't got around to writing a
libgpiod interface yet (although it is on my to-do list [1]), but when I
do it won't be able to support things like the Motor class, or Servo, or
PWMLED because it simply lacks the ability to perform PWM (whilst these
all work happily with the lg-gpio driver).
Incidentally, lg-gpio (and eventually libgpiod) potentially open
gpiozero up to being used on more platforms than just the Raspberry Pi
(although currently, the lg-gpio interface in it is Pi specific as
that's the only pin layout it knows).
Finally, there's an "rg" (remote GPIO) library that builds on top of
lg-gpio (by the same author) that fills the same socket-based role that
pigpiod provides above (perhaps unsurprisingly, the author of pigpiod is
also the author of lg and rg). I haven't gotten around to writing an rg
interface layer for gpiozero yet, but it's also on my to-do list.
A more complete write-up of all this (and other aspects) is at [2], but
hopefully that's enough?
[1]
https://github.com/gpiozero/gpiozero/issues/840#issuecomment-787521929
[2]
https://waldorf.waveform.org.uk/2021/the-pins-they-are-a-changin.html
Thanks for your attention,
Dave Jones.