• Kent Gibson's avatar
    gpiolib: cdev: consolidate edge detector configuration flags · b1a92e94
    Kent Gibson authored
    Combine the polarity_change flag, struct line eflags, and hte enable
    flag into a single flag variable.
    
    The combination of these flags describes the configuration state
    of the edge detector, so formalize and clarify that by combining
    them into a single variable, edflags, in struct line.
    
    The edflags is a subset of the GPIO_V2_LINE_FLAGsb relevant to
    the edge detector, and is also a superset of the eflags it replaces.
    The eflags name is still used to describe the subset of edflags
    corresponding to the rising/falling edge flags where edflags is
    masked down to that subset.
    
    This consolidation reduces the number of variables being passed,
    simplifies state comparisons, and provides a more extensible
    foundation should additional edge sources be integrated in the
    future.
    Signed-off-by: default avatarKent Gibson <warthog618@gmail.com>
    Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
    Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
    b1a92e94
gpiolib-cdev.c 64.2 KB