Re: [libgpiod][PATCH v2 7/7] core: add the kernel uapi header to the repository

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

 



On Mon, Jan 18, 2021 at 1:22 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
>
> On Fri, Jan 15, 2021 at 11:30:18AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> >
> > In order to avoid any problems with symbols missing from the host linux
> > kernel headers (for example: if current version of libgpiod supports
> > features that were added recently to the kernel but the host headers are
> > outdated and don't export required symbols) let's add the uapi header to
> > the repository and include it instead of the one in /usr/include/linux.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> > ---
> >  configure.ac    |  12 +-
> >  lib/Makefile.am |   2 +-
> >  lib/core.c      |   3 +-
> >  lib/uapi/gpio.h | 522 ++++++++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 528 insertions(+), 11 deletions(-)
> >  create mode 100644 lib/uapi/gpio.h
> >
>
> [snip]
> > +enum gpio_v2_line_flag {
> > +     GPIO_V2_LINE_FLAG_USED                  = _BITULL(0),
> > +     GPIO_V2_LINE_FLAG_ACTIVE_LOW            = _BITULL(1),
> > +     GPIO_V2_LINE_FLAG_INPUT                 = _BITULL(2),
> > +     GPIO_V2_LINE_FLAG_OUTPUT                = _BITULL(3),
> > +     GPIO_V2_LINE_FLAG_EDGE_RISING           = _BITULL(4),
> > +     GPIO_V2_LINE_FLAG_EDGE_FALLING          = _BITULL(5),
> > +     GPIO_V2_LINE_FLAG_OPEN_DRAIN            = _BITULL(6),
> > +     GPIO_V2_LINE_FLAG_OPEN_SOURCE           = _BITULL(7),
> > +     GPIO_V2_LINE_FLAG_BIAS_PULL_UP          = _BITULL(8),
> > +     GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN        = _BITULL(9),
> > +     GPIO_V2_LINE_FLAG_BIAS_DISABLED         = _BITULL(10),
> > +};
>
> Perhaps include the header from v5.11-rc3 that includes the
> GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag?
>
> Unless your intent is for the next libgpiod release to explicitly target
> v5.10?
>

Not at all! I'll just update the header once a new linux version is
out. I doubt v2.0 will be done anytime soon and I don't want to rush
it.

Bart

> +1 for including the header, btw.  Targetting a specific kernel header
> simplifies the build.  We are always going to have to deal with current
> apps being run on old kernels, either way, and anyone that cares to use
> current features has to ensure they have a current kernel, either way.
>
> Cheers,
> Kent.



[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