forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/gpio/gpio-raspberrypi-exp.c
....@@ -147,7 +147,10 @@
147147 get.gpio);
148148 return ret ? ret : -EIO;
149149 }
150
- return !get.direction;
150
+ if (get.direction)
151
+ return GPIO_LINE_DIRECTION_OUT;
152
+
153
+ return GPIO_LINE_DIRECTION_IN;
151154 }
152155
153156 static int rpi_exp_gpio_get(struct gpio_chip *gc, unsigned int off)