gpio: unify gpio direction macros names with Linux kernel
See linux.git/include/linux/gpio.h and linux.git/Documentation/gpio.txt for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
d7fc449a2e
commit
6339a419e9
|
@ -95,7 +95,7 @@ static int dw_gpio_get_direction(struct gpio_chip *gc, unsigned offset)
|
|||
struct dw_gpio_instance *chip = to_dw_gpio(gc);
|
||||
|
||||
return (readl(chip->regs + DW_GPIO_DDR) & (1 << offset)) ?
|
||||
GPIO_DIR_OUT : GPIO_DIR_IN;
|
||||
GPIOF_DIR_OUT : GPIOF_DIR_IN;
|
||||
}
|
||||
|
||||
static struct gpio_ops imx_gpio_ops = {
|
||||
|
|
|
@ -253,7 +253,7 @@ static int do_gpiolib(int argc, char *argv[])
|
|||
i - gi->chip->base);
|
||||
|
||||
printf(" gpio %*d: %*s %*s %*s %s\n", 4, i,
|
||||
3, (dir < 0) ? "unk" : ((dir == GPIO_DIR_IN) ? "in" : "out"),
|
||||
3, (dir < 0) ? "unk" : ((dir == GPIOF_DIR_IN) ? "in" : "out"),
|
||||
3, (val < 0) ? "unk" : ((val == 0) ? "lo" : "hi"),
|
||||
9, gi->requested ? "true" : "false",
|
||||
gi->label ? gi->label : "");
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <asm/gpio.h>
|
||||
|
||||
#define GPIO_DIR_OUT (0 << 0)
|
||||
#define GPIO_DIR_IN (1 << 0)
|
||||
#define GPIOF_DIR_OUT (0 << 0)
|
||||
#define GPIOF_DIR_IN (1 << 0)
|
||||
|
||||
#ifndef CONFIG_GPIOLIB
|
||||
static inline int gpio_request(unsigned gpio, const char *label)
|
||||
|
|
Loading…
Reference in New Issue