| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2017 Sanechips Technology Co., Ltd. |
|---|
| 3 | 4 | * Copyright 2017 Linaro Ltd. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 97 | 94 | if (data->aon_pin) { |
|---|
| 98 | 95 | /* |
|---|
| 99 | 96 | * It's an AON pin, whose mux register offset and bit position |
|---|
| 100 | | - * can be caluculated from pin number. Each register covers 16 |
|---|
| 97 | + * can be calculated from pin number. Each register covers 16 |
|---|
| 101 | 98 | * pins, and each pin occupies 2 bits. |
|---|
| 102 | 99 | */ |
|---|
| 103 | 100 | u16 aoffset = pindesc->number / 16 * 4; |
|---|
| .. | .. |
|---|
| 390 | 387 | struct pinctrl_desc *pctldesc; |
|---|
| 391 | 388 | struct zx_pinctrl *zpctl; |
|---|
| 392 | 389 | struct device_node *np; |
|---|
| 393 | | - struct resource *res; |
|---|
| 394 | 390 | int ret; |
|---|
| 395 | 391 | |
|---|
| 396 | 392 | zpctl = devm_kzalloc(&pdev->dev, sizeof(*zpctl), GFP_KERNEL); |
|---|
| .. | .. |
|---|
| 399 | 395 | |
|---|
| 400 | 396 | spin_lock_init(&zpctl->lock); |
|---|
| 401 | 397 | |
|---|
| 402 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 403 | | - zpctl->base = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 398 | + zpctl->base = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 404 | 399 | if (IS_ERR(zpctl->base)) |
|---|
| 405 | 400 | return PTR_ERR(zpctl->base); |
|---|
| 406 | 401 | |
|---|