docs/gpio: add note about kernel headers required for cdev support

This commit was derived from the original commit in PR #27:

  gpio: add sysfs gpio only support

  With detection of the gpio cdev interface a part of CMakeLists.txt,
  add a define to version.h which for explicitly enabling the gpio cdev
  interface. This will allow c-periphery to be compiled for older
  platforms which only support the gpio sysfs interface (currently
  toolchains with 4.4 headers).

  Typically toolchains have older headers than their platform and since
  the 4.4 kernel is being maintained until Feb 2022, this means there
  will still be new toolchains that are using kernel headers older than
  4.8.

  Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
This commit is contained in:
Ryan Barnett
2020-06-10 12:28:35 -05:00
committed by Vanya A. Sergeev
parent 05262e6dc8
commit 50fcd0a073

View File

@@ -2,6 +2,8 @@
GPIO wrapper functions for Linux userspace character device `gpio-cdev` and sysfs GPIOs.
Character device GPIOs were introduced in Linux kernel version 4.8. If the toolchain used to compiled c-periphery contains Linux kernel headers older than 4.8 (i.e. `linux/gpio.h` is missing), then only legacy sysfs GPIOs will be supported.
### SYNOPSIS
``` c