summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-05-25 10:23:05 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-05-30 15:25:31 -0500
commit36df1979f5c11d4e4dbe144b63f42390b6088f76 (patch)
tree42e97a07668e3f3ed7a4cc460e4888dd1e3d15bf /configure.ac
parent936a504319e01642fc5803c00ff4aa5baeafacef (diff)
downloadphosphor-gpio-monitor-36df1979f5c11d4e4dbe144b63f42390b6088f76.tar.gz
phosphor-gpio-monitor-36df1979f5c11d4e4dbe144b63f42390b6088f76.zip
Add GPIO class
This class is used for accessing a GPIO via the /dev/gpiochipX interface. It requests a GPIO line handle from the GPIO device to do the actual operation on. The GPIO number to use, for AST chips at least, is the actual GPIO number, such as GPIOA0 = 0 and GPIOA7 = 7. The class currently only supports writes. Change-Id: I1c2ae38c23c5db502d5f14bcf9aa2e35094f1e9b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ae95205..1a2bb98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,13 @@ PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, [AC_MSG_ERROR([Could not find sdbus
PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],, [AC_MSG_ERROR([Could not find phosphor-dbus-interfaces...openbmc/phosphor-dbus-interfaces package required])])
PKG_CHECK_MODULES([LIBEVDEV], [libevdev],, [AC_MSG_ERROR([Could not find libevdev...libevdev package required])])
+# Download gpio.h from github if necessary.
+AC_CHECK_HEADER(linux/gpio.h,[HAVE_LINUX_GPIO_H=""],[HAVE_LINUX_GPIO_H="-I linux/gpio.h"])
+AS_IF([test "$HAVE_LINUX_GPIO_H" != ""],
+ AC_MSG_WARN([Could not find linux/gpio.h: Attempting to download locally for building from https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/gpio.h])
+ AC_SUBST([BT_BMC_DL],[`mkdir -p linux;wget https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/gpio.h -O linux/gpio.h`])
+)
+
# Check/set gtest specific functions.
AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
AC_SUBST(GTEST_CPPFLAGS)
OpenPOWER on IntegriCloud