| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Conexant Digicolor General Purpose Pin Mapping |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Author: Baruch Siach <baruch@tkos.co.il> |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (C) 2015 Paradox Innovation Ltd. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | 8 | * |
|---|
| 13 | 9 | * TODO: |
|---|
| 14 | 10 | * - GPIO interrupt support |
|---|
| .. | .. |
|---|
| 20 | 16 | #include <linux/of.h> |
|---|
| 21 | 17 | #include <linux/of_device.h> |
|---|
| 22 | 18 | #include <linux/io.h> |
|---|
| 23 | | -#include <linux/gpio.h> |
|---|
| 24 | 19 | #include <linux/gpio/driver.h> |
|---|
| 25 | 20 | #include <linux/spinlock.h> |
|---|
| 26 | 21 | #include <linux/pinctrl/machine.h> |
|---|
| .. | .. |
|---|
| 275 | 270 | static int dc_pinctrl_probe(struct platform_device *pdev) |
|---|
| 276 | 271 | { |
|---|
| 277 | 272 | struct dc_pinmap *pmap; |
|---|
| 278 | | - struct resource *r; |
|---|
| 279 | 273 | struct pinctrl_pin_desc *pins; |
|---|
| 280 | 274 | struct pinctrl_desc *pctl_desc; |
|---|
| 281 | 275 | char *pin_names; |
|---|
| .. | .. |
|---|
| 286 | 280 | if (!pmap) |
|---|
| 287 | 281 | return -ENOMEM; |
|---|
| 288 | 282 | |
|---|
| 289 | | - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 290 | | - pmap->regs = devm_ioremap_resource(&pdev->dev, r); |
|---|
| 283 | + pmap->regs = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 291 | 284 | if (IS_ERR(pmap->regs)) |
|---|
| 292 | 285 | return PTR_ERR(pmap->regs); |
|---|
| 293 | 286 | |
|---|