History

gpiolib: add support for disabling line bias

Allow pull up/down bias to be disabled, allowing the line to float or to be biased only by external circuitry. Use case is for where the bias has been applied previously, either by default or by the user, but that setting may conflict with the current use of the line.

Kent Gibson committed 7 years ago

Commit 2148ad71 parent 7b479a83 files · +54 −10Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/gpio.h+2−0
@@ -35,6 +35,7 @@ struct gpiochip_info { · 34 unmodified lines
3535 #define GPIOLINE_FLAG_OPEN_SOURCE (1UL << 4)
3636 #define GPIOLINE_FLAG_BIAS_PULL_UP (1UL << 5)
3737 #define GPIOLINE_FLAG_BIAS_PULL_DOWN (1UL << 6)
38+#define GPIOLINE_FLAG_BIAS_DISABLE (1UL << 7)
3839
3940 /**
4041 * struct gpioline_info - Information about a certain GPIO line
@@ -66,6 +67,7 @@ struct gpioline_info { · 25 unmodified lines
6667 #define GPIOHANDLE_REQUEST_OPEN_SOURCE (1UL << 4)
6768 #define GPIOHANDLE_REQUEST_BIAS_PULL_UP (1UL << 5)
6869 #define GPIOHANDLE_REQUEST_BIAS_PULL_DOWN (1UL << 6)
70+#define GPIOHANDLE_REQUEST_BIAS_DISABLE (1UL << 7)
6971
7072 /**
7173 * struct gpiohandle_request - Information about a GPIO handle request