|
@@ -35,8 +35,8 @@
|
|
|
#define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__)
|
|
|
|
|
|
enum {
|
|
|
- GPIO_MOCKUP_DIR_OUT = 0,
|
|
|
- GPIO_MOCKUP_DIR_IN = 1,
|
|
|
+ GPIO_MOCKUP_DIR_IN = 0,
|
|
|
+ GPIO_MOCKUP_DIR_OUT = 1,
|
|
|
};
|
|
|
|
|
|
/*
|
|
@@ -131,7 +131,7 @@ static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset)
|
|
|
{
|
|
|
struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
|
|
|
|
|
|
- return chip->lines[offset].dir;
|
|
|
+ return !chip->lines[offset].dir;
|
|
|
}
|
|
|
|
|
|
static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset)
|