.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * gpio-reg: single register individually fixed-direction GPIOs |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2016 Russell King |
---|
5 | | - * |
---|
6 | | - * This software is licensed under the terms of the GNU General Public |
---|
7 | | - * License version 2, as published by the Free Software Foundation, and |
---|
8 | | - * may be copied, distributed, and modified under those terms. |
---|
9 | 6 | */ |
---|
10 | 7 | #include <linux/gpio/driver.h> |
---|
11 | 8 | #include <linux/gpio/gpio-reg.h> |
---|
.. | .. |
---|
29 | 26 | { |
---|
30 | 27 | struct gpio_reg *r = to_gpio_reg(gc); |
---|
31 | 28 | |
---|
32 | | - return r->direction & BIT(offset) ? 1 : 0; |
---|
| 29 | + return r->direction & BIT(offset) ? GPIO_LINE_DIRECTION_IN : |
---|
| 30 | + GPIO_LINE_DIRECTION_OUT; |
---|
33 | 31 | } |
---|
34 | 32 | |
---|
35 | 33 | static int gpio_reg_direction_output(struct gpio_chip *gc, unsigned offset, |
---|