Message ID | 20180727144701.74026-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | [v1] gpiolib: Use GPIOD_OUT_{LOW,HIGH} macros in open drain ones | expand |
On Fri, Jul 27, 2018 at 4:46 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > There should not be anything more than stated by the name of newly > introduced constants, i.e. > CPIOD_OUT_LOW_OPEN_DRAIN == GPIOD_OUT_LOW + open drain > and nothing more. > > Make it better to read and slightly more robust by using GPIOD_OUT_LOW > and GPIOD_OUT_HIGH constants with open drain flag. > > No functional change intended. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Patch applied! Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index e8aaf34dd65d..21ddbe440030 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -41,11 +41,8 @@ enum gpiod_flags { GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT, GPIOD_OUT_HIGH = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT | GPIOD_FLAGS_BIT_DIR_VAL, - GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_FLAGS_BIT_DIR_SET | - GPIOD_FLAGS_BIT_DIR_OUT | GPIOD_FLAGS_BIT_OPEN_DRAIN, - GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_FLAGS_BIT_DIR_SET | - GPIOD_FLAGS_BIT_DIR_OUT | GPIOD_FLAGS_BIT_DIR_VAL | - GPIOD_FLAGS_BIT_OPEN_DRAIN, + GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_OPEN_DRAIN, + GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_OPEN_DRAIN, }; #ifdef CONFIG_GPIOLIB
There should not be anything more than stated by the name of newly introduced constants, i.e. CPIOD_OUT_LOW_OPEN_DRAIN == GPIOD_OUT_LOW + open drain and nothing more. Make it better to read and slightly more robust by using GPIOD_OUT_LOW and GPIOD_OUT_HIGH constants with open drain flag. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- include/linux/gpio/consumer.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)