| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * GPIO driver for TI TPS65912x PMICs |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ |
|---|
| 5 | 6 | * Andrew F. Davis <afd@ti.com> |
|---|
| 6 | 7 | * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or |
|---|
| 8 | | - * modify it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
|---|
| 12 | | - * kind, whether expressed or implied; without even the implied warranty |
|---|
| 13 | | - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License version 2 for more details. |
|---|
| 15 | | - * |
|---|
| 16 | 8 | * Based on the Arizona GPIO driver and the previous TPS65912 driver by |
|---|
| 17 | 9 | * Margarita Olaya Cabrera <magi@slimlogic.co.uk> |
|---|
| 18 | 10 | */ |
|---|
| 19 | 11 | |
|---|
| 20 | | -#include <linux/gpio.h> |
|---|
| 12 | +#include <linux/gpio/driver.h> |
|---|
| 21 | 13 | #include <linux/module.h> |
|---|
| 22 | 14 | #include <linux/platform_device.h> |
|---|
| 23 | 15 | |
|---|
| .. | .. |
|---|
| 40 | 32 | return ret; |
|---|
| 41 | 33 | |
|---|
| 42 | 34 | if (val & GPIO_CFG_MASK) |
|---|
| 43 | | - return GPIOF_DIR_OUT; |
|---|
| 35 | + return GPIO_LINE_DIRECTION_OUT; |
|---|
| 44 | 36 | else |
|---|
| 45 | | - return GPIOF_DIR_IN; |
|---|
| 37 | + return GPIO_LINE_DIRECTION_IN; |
|---|
| 46 | 38 | } |
|---|
| 47 | 39 | |
|---|
| 48 | 40 | static int tps65912_gpio_direction_input(struct gpio_chip *gc, unsigned offset) |
|---|