Fix problem with ugpio-version.h when srcdir != builddir

Signed-off-by: Fredrik Svensson <fredriks@axis.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Fix a problem with gpio_request_one

Say that the gpio pin has already been exported when gpio_request_one is
called. If any of the calls to gpio_direction_input, gpio_alterable_edge,
gpio_set_edge, etc fail. Then gpio_request_one will erroneously
unexport the pin before returning.

Signed-off-by: Fredrik Svensson <fredriks@axis.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Clamp return values of *_get_value to boolean range

There exists some kernel versions where platforms (e.g. mxs) pass
the internal value of gpio_get_value via sysfs.
A fix is on the way, see https://lkml.org/lkml/2014/3/11/58 for
reference, however, we can catch this here, too.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Bump version to 0.0.4

Signed-off-by: Michael Heimpold <mhei@heimpold.de>