From 50fcd0a0731ec526d57b455d2fd0649c63898a22 Mon Sep 17 00:00:00 2001 From: Ryan Barnett Date: Wed, 10 Jun 2020 12:28:35 -0500 Subject: [PATCH] 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 Signed-off-by: Vanya A. Sergeev --- docs/gpio.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/gpio.md b/docs/gpio.md index 84ff317..769ca46 100644 --- a/docs/gpio.md +++ b/docs/gpio.md @@ -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