is_set_func is_set;
};
+static bool line_bias_is_pullup(struct gpiod_line *line)
+{
+ return gpiod_line_bias(line) == GPIOD_LINE_BIAS_PULL_UP;
+}
+
+static bool line_bias_is_pulldown(struct gpiod_line *line)
+{
+ return gpiod_line_bias(line) == GPIOD_LINE_BIAS_PULL_DOWN;
+}
+
+static bool line_bias_is_disabled(struct gpiod_line *line)
+{
+ return gpiod_line_bias(line) == GPIOD_LINE_BIAS_DISABLE;
+}
+
static const struct flag flags[] = {
{
.name = "used",
.name = "open-source",
.is_set = gpiod_line_is_open_source,
},
+ {
+ .name = "pull-up",
+ .is_set = line_bias_is_pullup,
+ },
+ {
+ .name = "pull-down",
+ .is_set = line_bias_is_pulldown,
+ },
+ {
+ .name = "bias-disabled",
+ .is_set = line_bias_is_disabled,
+ },
};
static const struct option longopts[] = {