| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2015, Sony Mobile Communications AB. |
|---|
| 3 | 4 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
|---|
| 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 and |
|---|
| 7 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 20 | 12 | #include <linux/pinctrl/pinconf-generic.h> |
|---|
| 21 | 13 | #include <linux/slab.h> |
|---|
| 22 | 14 | #include <linux/regmap.h> |
|---|
| 23 | | -#include <linux/gpio.h> |
|---|
| 15 | +#include <linux/gpio/driver.h> |
|---|
| 24 | 16 | #include <linux/interrupt.h> |
|---|
| 25 | 17 | #include <linux/of_device.h> |
|---|
| 26 | 18 | #include <linux/of_irq.h> |
|---|
| .. | .. |
|---|
| 438 | 430 | .pin_config_group_set = pm8xxx_pin_config_set, |
|---|
| 439 | 431 | }; |
|---|
| 440 | 432 | |
|---|
| 441 | | -static struct pinctrl_desc pm8xxx_pinctrl_desc = { |
|---|
| 433 | +static const struct pinctrl_desc pm8xxx_pinctrl_desc = { |
|---|
| 442 | 434 | .name = "pm8xxx_mpp", |
|---|
| 443 | 435 | .pctlops = &pm8xxx_pinctrl_ops, |
|---|
| 444 | 436 | .pmxops = &pm8xxx_pinmux_ops, |
|---|
| .. | .. |
|---|
| 625 | 617 | } |
|---|
| 626 | 618 | break; |
|---|
| 627 | 619 | } |
|---|
| 628 | | - |
|---|
| 629 | 620 | } |
|---|
| 630 | 621 | |
|---|
| 631 | 622 | static void pm8xxx_mpp_dbg_show(struct seq_file *s, struct gpio_chip *chip) |
|---|
| .. | .. |
|---|
| 799 | 790 | for (i = 0; i < pctrl->desc.npins; i++) { |
|---|
| 800 | 791 | pin_data[i].reg = SSBI_REG_ADDR_MPP(i); |
|---|
| 801 | 792 | pin_data[i].irq = platform_get_irq(pdev, i); |
|---|
| 802 | | - if (pin_data[i].irq < 0) { |
|---|
| 803 | | - dev_err(&pdev->dev, |
|---|
| 804 | | - "missing interrupts for pin %d\n", i); |
|---|
| 793 | + if (pin_data[i].irq < 0) |
|---|
| 805 | 794 | return pin_data[i].irq; |
|---|
| 806 | | - } |
|---|
| 807 | 795 | |
|---|
| 808 | 796 | ret = pm8xxx_pin_populate(pctrl, &pin_data[i]); |
|---|
| 809 | 797 | if (ret) |
|---|