All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [libgpiod][PATCH v2 7/7] core: add the kernel uapi header to the repository
Date: Mon, 18 Jan 2021 08:22:18 +0800	[thread overview]
Message-ID: <20210118002218.GC6841@sol> (raw)
In-Reply-To: <20210115103018.27704-8-brgl@bgdev.pl>

On Fri, Jan 15, 2021 at 11:30:18AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> 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@baylibre.com>
> ---
>  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?

+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.

  reply	other threads:[~2021-01-18  0:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 10:30 [libgpiod][PATCH v2 0/7] treewide: remove more cruft and add some improvements Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 1/7] treewide: remove helpers for opening chips by name & number Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 2/7] treewide: simplify the active-low line property Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 3/7] treewide: rename BIAS_AS_IS to BIAS_UNKNOWN Bartosz Golaszewski
2021-01-18  0:07   ` Kent Gibson
2021-01-18 11:40     ` Bartosz Golaszewski
2021-01-19  0:27       ` Kent Gibson
2021-01-15 10:30 ` [libgpiod][PATCH v2 4/7] treewide: rename BIAS_DISABLE to BIAS_DISABLED Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 5/7] treewide: make drive settings an enum Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 6/7] bindings: cxx: line: reorder bias mapping entries Bartosz Golaszewski
2021-01-15 10:30 ` [libgpiod][PATCH v2 7/7] core: add the kernel uapi header to the repository Bartosz Golaszewski
2021-01-18  0:22   ` Kent Gibson [this message]
2021-01-18  9:57     ` Bartosz Golaszewski
2021-01-18  1:01 ` [libgpiod][PATCH v2 0/7] treewide: remove more cruft and add some improvements Kent Gibson

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=20210118002218.GC6841@sol \
    --to=warthog618@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.