@@ -451,7 +451,9 @@ enum {
* @brief Available internal bias settings for line requests.
*/
enum {
- GPIOD_LINE_CONFIG_BIAS_DISABLED = 1,
+ GPIOD_LINE_CONFIG_BIAS_AS_IS = 1,
+ /**< Don't change the current bias setting. */
+ GPIOD_LINE_CONFIG_BIAS_DISABLED,
/**< The internal bias should be disabled (the default). */
GPIOD_LINE_CONFIG_BIAS_PULL_UP,
/**< The internal pull-up bias is enabled. */
@@ -496,6 +496,7 @@ static int gpiod_make_kernel_flags(uint64_t *flags, struct base_config *config)
case GPIOD_LINE_CONFIG_BIAS_PULL_DOWN:
*flags |= GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN;
break;
+ case GPIOD_LINE_CONFIG_BIAS_AS_IS:
case 0:
break;
default:
We don't have an explicit default "as-is" value for the bias setting. This adds it. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> --- include/gpiod.h | 4 +++- lib/line-config.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-)