.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Pinctrl driver for the Wondermedia SoC's |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2013 Tony Prisk <linux@prisktech.co.nz> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms and conditions of the GNU General Public License, |
---|
8 | | - * version 2, as published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
13 | | - * more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/err.h> |
---|
.. | .. |
---|
495 | 487 | |
---|
496 | 488 | val = readl_relaxed(data->base + reg_dir); |
---|
497 | 489 | if (val & BIT(bit)) |
---|
498 | | - return GPIOF_DIR_OUT; |
---|
499 | | - else |
---|
500 | | - return GPIOF_DIR_IN; |
---|
| 490 | + return GPIO_LINE_DIRECTION_OUT; |
---|
| 491 | + |
---|
| 492 | + return GPIO_LINE_DIRECTION_IN; |
---|
501 | 493 | } |
---|
502 | 494 | |
---|
503 | 495 | static int wmt_gpio_get_value(struct gpio_chip *chip, unsigned offset) |
---|
.. | .. |
---|
563 | 555 | struct wmt_pinctrl_data *data) |
---|
564 | 556 | { |
---|
565 | 557 | int err; |
---|
566 | | - struct resource *res; |
---|
567 | 558 | |
---|
568 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
569 | | - data->base = devm_ioremap_resource(&pdev->dev, res); |
---|
| 559 | + data->base = devm_platform_ioremap_resource(pdev, 0); |
---|
570 | 560 | if (IS_ERR(data->base)) |
---|
571 | 561 | return PTR_ERR(data->base); |
---|
572 | 562 | |
---|