.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2013, Sony Mobile Communications AB. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 and |
---|
6 | | - * only version 2 as published by the Free Software Foundation. |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope that it will be useful, |
---|
9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | | - * GNU General Public License for more details. |
---|
12 | 4 | */ |
---|
13 | 5 | #ifndef __PINCTRL_MSM_H__ |
---|
14 | 6 | #define __PINCTRL_MSM_H__ |
---|
.. | .. |
---|
46 | 38 | * @mux_bit: Offset in @ctl_reg for the pinmux function selection. |
---|
47 | 39 | * @pull_bit: Offset in @ctl_reg for the bias configuration. |
---|
48 | 40 | * @drv_bit: Offset in @ctl_reg for the drive strength configuration. |
---|
| 41 | + * @od_bit: Offset in @ctl_reg for controlling open drain. |
---|
49 | 42 | * @oe_bit: Offset in @ctl_reg for controlling output enable. |
---|
50 | 43 | * @in_bit: Offset in @io_reg for the input bit value. |
---|
51 | 44 | * @out_bit: Offset in @io_reg for the output bit value. |
---|
.. | .. |
---|
76 | 69 | u32 intr_status_reg; |
---|
77 | 70 | u32 intr_target_reg; |
---|
78 | 71 | |
---|
| 72 | + unsigned int tile:2; |
---|
| 73 | + |
---|
79 | 74 | unsigned mux_bit:5; |
---|
80 | 75 | |
---|
81 | 76 | unsigned pull_bit:5; |
---|
82 | 77 | unsigned drv_bit:5; |
---|
83 | 78 | |
---|
| 79 | + unsigned od_bit:5; |
---|
84 | 80 | unsigned oe_bit:5; |
---|
85 | 81 | unsigned in_bit:5; |
---|
86 | 82 | unsigned out_bit:5; |
---|
.. | .. |
---|
98 | 94 | }; |
---|
99 | 95 | |
---|
100 | 96 | /** |
---|
| 97 | + * struct msm_gpio_wakeirq_map - Map of GPIOs and their wakeup pins |
---|
| 98 | + * @gpio: The GPIOs that are wakeup capable |
---|
| 99 | + * @wakeirq: The interrupt at the always-on interrupt controller |
---|
| 100 | + */ |
---|
| 101 | +struct msm_gpio_wakeirq_map { |
---|
| 102 | + unsigned int gpio; |
---|
| 103 | + unsigned int wakeirq; |
---|
| 104 | +}; |
---|
| 105 | + |
---|
| 106 | +/** |
---|
101 | 107 | * struct msm_pinctrl_soc_data - Qualcomm pin controller driver configuration |
---|
102 | 108 | * @pins: An array describing all pins the pin controller affects. |
---|
103 | 109 | * @npins: The number of entries in @pins. |
---|
.. | .. |
---|
107 | 113 | * @ngroups: The numbmer of entries in @groups. |
---|
108 | 114 | * @ngpio: The number of pingroups the driver should expose as GPIOs. |
---|
109 | 115 | * @pull_no_keeper: The SoC does not support keeper bias. |
---|
| 116 | + * @wakeirq_map: The map of wakeup capable GPIOs and the pin at PDC/MPM |
---|
| 117 | + * @nwakeirq_map: The number of entries in @wakeirq_map |
---|
| 118 | + * @wakeirq_dual_edge_errata: If true then GPIOs using the wakeirq_map need |
---|
| 119 | + * to be aware that their parent can't handle dual |
---|
| 120 | + * edge interrupts. |
---|
| 121 | + * @gpio_func: Which function number is GPIO (usually 0). |
---|
110 | 122 | */ |
---|
111 | 123 | struct msm_pinctrl_soc_data { |
---|
112 | 124 | const struct pinctrl_pin_desc *pins; |
---|
.. | .. |
---|
117 | 129 | unsigned ngroups; |
---|
118 | 130 | unsigned ngpios; |
---|
119 | 131 | bool pull_no_keeper; |
---|
| 132 | + const char *const *tiles; |
---|
| 133 | + unsigned int ntiles; |
---|
| 134 | + const int *reserved_gpios; |
---|
| 135 | + const struct msm_gpio_wakeirq_map *wakeirq_map; |
---|
| 136 | + unsigned int nwakeirq_map; |
---|
| 137 | + bool wakeirq_dual_edge_errata; |
---|
| 138 | + unsigned int gpio_func; |
---|
120 | 139 | }; |
---|
121 | 140 | |
---|
| 141 | +extern const struct dev_pm_ops msm_pinctrl_dev_pm_ops; |
---|
| 142 | + |
---|
122 | 143 | int msm_pinctrl_probe(struct platform_device *pdev, |
---|
123 | 144 | const struct msm_pinctrl_soc_data *soc_data); |
---|
124 | 145 | int msm_pinctrl_remove(struct platform_device *pdev); |
---|