diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 22:21:02 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 22:21:02 -0400 |
| commit | 93a4b1b9465d92e8be031b57166afa3d5611e142 (patch) | |
| tree | 0ac95e35f24a754e01bdc40c56d71068eed49e4c /include | |
| parent | d59b92f93df2d545d87d2341eb0705cc926ea22a (diff) | |
| parent | daecdc66968f122fe53038ded8cb7abe93e0aa8c (diff) | |
Merge tag 'pinctrl-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij:
"Here is the bulk of pin control changes for the v4.2 series: Quite a
lot of new SoC subdrivers and two new main drivers this time, apart
from that business as usual.
Details:
Core functionality:
- Enable exclusive pin ownership: it is possible to flag a pin
controller so that GPIO and other functions cannot use a single pin
simultaneously.
New drivers:
- NXP LPC18xx System Control Unit pin controller
- Imagination Pistachio SoC pin controller
New subdrivers:
- Freescale i.MX7d SoC
- Intel Sunrisepoint-H PCH
- Renesas PFC R8A7793
- Renesas PFC R8A7794
- Mediatek MT6397, MT8127
- SiRF Atlas 7
- Allwinner A33
- Qualcomm MSM8660
- Marvell Armada 395
- Rockchip RK3368
Cleanups:
- A big cleanup of the Marvell MVEBU driver rectifying it to
correspond to reality
- Drop platform device probing from the SH PFC driver, we are now a
DT only shop for SuperH
- Drop obsolte multi-platform check for SH PFC
- Various janitorial: constification, grammar etc
Improvements:
- The AT91 GPIO portions now supports the set_multiple() feature
- Split out SPI pins on the Xilinx Zynq
- Support DTs without specific function nodes in the i.MX driver"
* tag 'pinctrl-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (99 commits)
pinctrl: rockchip: add support for the rk3368
pinctrl: rockchip: generalize perpin driver-strength setting
pinctrl: sh-pfc: r8a7794: add SDHI pin groups
pinctrl: sh-pfc: r8a7794: add MMCIF pin groups
pinctrl: sh-pfc: add R8A7794 PFC support
pinctrl: make pinctrl_register() return proper error code
pinctrl: mvebu: armada-39x: add support for Armada 395 variant
pinctrl: mvebu: armada-39x: add missing SATA functions
pinctrl: mvebu: armada-39x: add missing PCIe functions
pinctrl: mvebu: armada-38x: add ptp functions
pinctrl: mvebu: armada-38x: add ua1 functions
pinctrl: mvebu: armada-38x: add nand functions
pinctrl: mvebu: armada-38x: add sata functions
pinctrl: mvebu: armada-xp: add dram functions
pinctrl: mvebu: armada-xp: add nand rb function
pinctrl: mvebu: armada-xp: add spi1 function
pinctrl: mvebu: armada-39x: normalize ref clock naming
pinctrl: mvebu: armada-xp: rename spi to spi0
pinctrl: mvebu: armada-370: align spi1 clock pin naming
pinctrl: mvebu: armada-370: align VDD cpu-pd pin naming with datasheet
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/pinctrl/mt6397-pinfunc.h | 256 | ||||
| -rw-r--r-- | include/linux/pinctrl/consumer.h | 2 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinctrl.h | 2 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinmux.h | 6 |
4 files changed, 263 insertions, 3 deletions
diff --git a/include/dt-bindings/pinctrl/mt6397-pinfunc.h b/include/dt-bindings/pinctrl/mt6397-pinfunc.h new file mode 100644 index 000000000000..85739b308c2f --- /dev/null +++ b/include/dt-bindings/pinctrl/mt6397-pinfunc.h | |||
| @@ -0,0 +1,256 @@ | |||
| 1 | #ifndef __DTS_MT6397_PINFUNC_H | ||
| 2 | #define __DTS_MT6397_PINFUNC_H | ||
| 3 | |||
| 4 | #include <dt-bindings/pinctrl/mt65xx.h> | ||
| 5 | |||
| 6 | #define MT6397_PIN_0_INT__FUNC_GPIO0 (MTK_PIN_NO(0) | 0) | ||
| 7 | #define MT6397_PIN_0_INT__FUNC_INT (MTK_PIN_NO(0) | 1) | ||
| 8 | |||
| 9 | #define MT6397_PIN_1_SRCVOLTEN__FUNC_GPIO1 (MTK_PIN_NO(1) | 0) | ||
| 10 | #define MT6397_PIN_1_SRCVOLTEN__FUNC_SRCVOLTEN (MTK_PIN_NO(1) | 1) | ||
| 11 | #define MT6397_PIN_1_SRCVOLTEN__FUNC_TEST_CK1 (MTK_PIN_NO(1) | 6) | ||
| 12 | |||
| 13 | #define MT6397_PIN_2_SRCLKEN_PERI__FUNC_GPIO2 (MTK_PIN_NO(2) | 0) | ||
| 14 | #define MT6397_PIN_2_SRCLKEN_PERI__FUNC_SRCLKEN_PERI (MTK_PIN_NO(2) | 1) | ||
| 15 | #define MT6397_PIN_2_SRCLKEN_PERI__FUNC_TEST_CK2 (MTK_PIN_NO(2) | 6) | ||
| 16 | |||
| 17 | #define MT6397_PIN_3_RTC_32K1V8__FUNC_GPIO3 (MTK_PIN_NO(3) | 0) | ||
| 18 | #define MT6397_PIN_3_RTC_32K1V8__FUNC_RTC_32K1V8 (MTK_PIN_NO(3) | 1) | ||
| 19 | #define MT6397_PIN_3_RTC_32K1V8__FUNC_TEST_CK3 (MTK_PIN_NO(3) | 6) | ||
| 20 | |||
| 21 | #define MT6397_PIN_4_WRAP_EVENT__FUNC_GPIO4 (MTK_PIN_NO(4) | 0) | ||
| 22 | #define MT6397_PIN_4_WRAP_EVENT__FUNC_WRAP_EVENT (MTK_PIN_NO(4) | 1) | ||
| 23 | |||
| 24 | #define MT6397_PIN_5_SPI_CLK__FUNC_GPIO5 (MTK_PIN_NO(5) | 0) | ||
| 25 | #define MT6397_PIN_5_SPI_CLK__FUNC_SPI_CLK (MTK_PIN_NO(5) | 1) | ||
| 26 | |||
| 27 | #define MT6397_PIN_6_SPI_CSN__FUNC_GPIO6 (MTK_PIN_NO(6) | 0) | ||
| 28 | #define MT6397_PIN_6_SPI_CSN__FUNC_SPI_CSN (MTK_PIN_NO(6) | 1) | ||
| 29 | |||
| 30 | #define MT6397_PIN_7_SPI_MOSI__FUNC_GPIO7 (MTK_PIN_NO(7) | 0) | ||
| 31 | #define MT6397_PIN_7_SPI_MOSI__FUNC_SPI_MOSI (MTK_PIN_NO(7) | 1) | ||
| 32 | |||
| 33 | #define MT6397_PIN_8_SPI_MISO__FUNC_GPIO8 (MTK_PIN_NO(8) | 0) | ||
| 34 | #define MT6397_PIN_8_SPI_MISO__FUNC_SPI_MISO (MTK_PIN_NO(8) | 1) | ||
| 35 | |||
| 36 | #define MT6397_PIN_9_AUD_CLK_MOSI__FUNC_GPIO9 (MTK_PIN_NO(9) | 0) | ||
| 37 | #define MT6397_PIN_9_AUD_CLK_MOSI__FUNC_AUD_CLK (MTK_PIN_NO(9) | 1) | ||
| 38 | #define MT6397_PIN_9_AUD_CLK_MOSI__FUNC_TEST_IN0 (MTK_PIN_NO(9) | 6) | ||
| 39 | #define MT6397_PIN_9_AUD_CLK_MOSI__FUNC_TEST_OUT0 (MTK_PIN_NO(9) | 7) | ||
| 40 | |||
| 41 | #define MT6397_PIN_10_AUD_DAT_MISO__FUNC_GPIO10 (MTK_PIN_NO(10) | 0) | ||
| 42 | #define MT6397_PIN_10_AUD_DAT_MISO__FUNC_AUD_MISO (MTK_PIN_NO(10) | 1) | ||
| 43 | #define MT6397_PIN_10_AUD_DAT_MISO__FUNC_TEST_IN1 (MTK_PIN_NO(10) | 6) | ||
| 44 | #define MT6397_PIN_10_AUD_DAT_MISO__FUNC_TEST_OUT1 (MTK_PIN_NO(10) | 7) | ||
| 45 | |||
| 46 | #define MT6397_PIN_11_AUD_DAT_MOSI__FUNC_GPIO11 (MTK_PIN_NO(11) | 0) | ||
| 47 | #define MT6397_PIN_11_AUD_DAT_MOSI__FUNC_AUD_MOSI (MTK_PIN_NO(11) | 1) | ||
| 48 | #define MT6397_PIN_11_AUD_DAT_MOSI__FUNC_TEST_IN2 (MTK_PIN_NO(11) | 6) | ||
| 49 | #define MT6397_PIN_11_AUD_DAT_MOSI__FUNC_TEST_OUT2 (MTK_PIN_NO(11) | 7) | ||
| 50 | |||
| 51 | #define MT6397_PIN_12_COL0__FUNC_GPIO12 (MTK_PIN_NO(12) | 0) | ||
| 52 | #define MT6397_PIN_12_COL0__FUNC_COL0_USBDL (MTK_PIN_NO(12) | 1) | ||
| 53 | #define MT6397_PIN_12_COL0__FUNC_EINT10_1X (MTK_PIN_NO(12) | 2) | ||
| 54 | #define MT6397_PIN_12_COL0__FUNC_PWM1_3X (MTK_PIN_NO(12) | 3) | ||
| 55 | #define MT6397_PIN_12_COL0__FUNC_TEST_IN3 (MTK_PIN_NO(12) | 6) | ||
| 56 | #define MT6397_PIN_12_COL0__FUNC_TEST_OUT3 (MTK_PIN_NO(12) | 7) | ||
| 57 | |||
| 58 | #define MT6397_PIN_13_COL1__FUNC_GPIO13 (MTK_PIN_NO(13) | 0) | ||
| 59 | #define MT6397_PIN_13_COL1__FUNC_COL1 (MTK_PIN_NO(13) | 1) | ||
| 60 | #define MT6397_PIN_13_COL1__FUNC_EINT11_1X (MTK_PIN_NO(13) | 2) | ||
| 61 | #define MT6397_PIN_13_COL1__FUNC_SCL0_2X (MTK_PIN_NO(13) | 3) | ||
| 62 | #define MT6397_PIN_13_COL1__FUNC_TEST_IN4 (MTK_PIN_NO(13) | 6) | ||
| 63 | #define MT6397_PIN_13_COL1__FUNC_TEST_OUT4 (MTK_PIN_NO(13) | 7) | ||
| 64 | |||
| 65 | #define MT6397_PIN_14_COL2__FUNC_GPIO14 (MTK_PIN_NO(14) | 0) | ||
| 66 | #define MT6397_PIN_14_COL2__FUNC_COL2 (MTK_PIN_NO(14) | 1) | ||
| 67 | #define MT6397_PIN_14_COL2__FUNC_EINT12_1X (MTK_PIN_NO(14) | 2) | ||
| 68 | #define MT6397_PIN_14_COL2__FUNC_SDA0_2X (MTK_PIN_NO(14) | 3) | ||
| 69 | #define MT6397_PIN_14_COL2__FUNC_TEST_IN5 (MTK_PIN_NO(14) | 6) | ||
| 70 | #define MT6397_PIN_14_COL2__FUNC_TEST_OUT5 (MTK_PIN_NO(14) | 7) | ||
| 71 | |||
| 72 | #define MT6397_PIN_15_COL3__FUNC_GPIO15 (MTK_PIN_NO(15) | 0) | ||
| 73 | #define MT6397_PIN_15_COL3__FUNC_COL3 (MTK_PIN_NO(15) | 1) | ||
| 74 | #define MT6397_PIN_15_COL3__FUNC_EINT13_1X (MTK_PIN_NO(15) | 2) | ||
| 75 | #define MT6397_PIN_15_COL3__FUNC_SCL1_2X (MTK_PIN_NO(15) | 3) | ||
| 76 | #define MT6397_PIN_15_COL3__FUNC_TEST_IN6 (MTK_PIN_NO(15) | 6) | ||
| 77 | #define MT6397_PIN_15_COL3__FUNC_TEST_OUT6 (MTK_PIN_NO(15) | 7) | ||
| 78 | |||
| 79 | #define MT6397_PIN_16_COL4__FUNC_GPIO16 (MTK_PIN_NO(16) | 0) | ||
| 80 | #define MT6397_PIN_16_COL4__FUNC_COL4 (MTK_PIN_NO(16) | 1) | ||
| 81 | #define MT6397_PIN_16_COL4__FUNC_EINT14_1X (MTK_PIN_NO(16) | 2) | ||
| 82 | #define MT6397_PIN_16_COL4__FUNC_SDA1_2X (MTK_PIN_NO(16) | 3) | ||
| 83 | #define MT6397_PIN_16_COL4__FUNC_TEST_IN7 (MTK_PIN_NO(16) | 6) | ||
| 84 | #define MT6397_PIN_16_COL4__FUNC_TEST_OUT7 (MTK_PIN_NO(16) | 7) | ||
| 85 | |||
| 86 | #define MT6397_PIN_17_COL5__FUNC_GPIO17 (MTK_PIN_NO(17) | 0) | ||
| 87 | #define MT6397_PIN_17_COL5__FUNC_COL5 (MTK_PIN_NO(17) | 1) | ||
| 88 | #define MT6397_PIN_17_COL5__FUNC_EINT15_1X (MTK_PIN_NO(17) | 2) | ||
| 89 | #define MT6397_PIN_17_COL5__FUNC_SCL2_2X (MTK_PIN_NO(17) | 3) | ||
| 90 | #define MT6397_PIN_17_COL5__FUNC_TEST_IN8 (MTK_PIN_NO(17) | 6) | ||
| 91 | #define MT6397_PIN_17_COL5__FUNC_TEST_OUT8 (MTK_PIN_NO(17) | 7) | ||
| 92 | |||
| 93 | #define MT6397_PIN_18_COL6__FUNC_GPIO18 (MTK_PIN_NO(18) | 0) | ||
| 94 | #define MT6397_PIN_18_COL6__FUNC_COL6 (MTK_PIN_NO(18) | 1) | ||
| 95 | #define MT6397_PIN_18_COL6__FUNC_EINT16_1X (MTK_PIN_NO(18) | 2) | ||
| 96 | #define MT6397_PIN_18_COL6__FUNC_SDA2_2X (MTK_PIN_NO(18) | 3) | ||
| 97 | #define MT6397_PIN_18_COL6__FUNC_GPIO32K_0 (MTK_PIN_NO(18) | 4) | ||
| 98 | #define MT6397_PIN_18_COL6__FUNC_GPIO26M_0 (MTK_PIN_NO(18) | 5) | ||
| 99 | #define MT6397_PIN_18_COL6__FUNC_TEST_IN9 (MTK_PIN_NO(18) | 6) | ||
| 100 | #define MT6397_PIN_18_COL6__FUNC_TEST_OUT9 (MTK_PIN_NO(18) | 7) | ||
| 101 | |||
| 102 | #define MT6397_PIN_19_COL7__FUNC_GPIO19 (MTK_PIN_NO(19) | 0) | ||
| 103 | #define MT6397_PIN_19_COL7__FUNC_COL7 (MTK_PIN_NO(19) | 1) | ||
| 104 | #define MT6397_PIN_19_COL7__FUNC_EINT17_1X (MTK_PIN_NO(19) | 2) | ||
| 105 | #define MT6397_PIN_19_COL7__FUNC_PWM2_3X (MTK_PIN_NO(19) | 3) | ||
| 106 | #define MT6397_PIN_19_COL7__FUNC_GPIO32K_1 (MTK_PIN_NO(19) | 4) | ||
| 107 | #define MT6397_PIN_19_COL7__FUNC_GPIO26M_1 (MTK_PIN_NO(19) | 5) | ||
| 108 | #define MT6397_PIN_19_COL7__FUNC_TEST_IN10 (MTK_PIN_NO(19) | 6) | ||
| 109 | #define MT6397_PIN_19_COL7__FUNC_TEST_OUT10 (MTK_PIN_NO(19) | 7) | ||
| 110 | |||
| 111 | #define MT6397_PIN_20_ROW0__FUNC_GPIO20 (MTK_PIN_NO(20) | 0) | ||
| 112 | #define MT6397_PIN_20_ROW0__FUNC_ROW0 (MTK_PIN_NO(20) | 1) | ||
| 113 | #define MT6397_PIN_20_ROW0__FUNC_EINT18_1X (MTK_PIN_NO(20) | 2) | ||
| 114 | #define MT6397_PIN_20_ROW0__FUNC_SCL0_3X (MTK_PIN_NO(20) | 3) | ||
| 115 | #define MT6397_PIN_20_ROW0__FUNC_TEST_IN11 (MTK_PIN_NO(20) | 6) | ||
| 116 | #define MT6397_PIN_20_ROW0__FUNC_TEST_OUT11 (MTK_PIN_NO(20) | 7) | ||
| 117 | |||
| 118 | #define MT6397_PIN_21_ROW1__FUNC_GPIO21 (MTK_PIN_NO(21) | 0) | ||
| 119 | #define MT6397_PIN_21_ROW1__FUNC_ROW1 (MTK_PIN_NO(21) | 1) | ||
| 120 | #define MT6397_PIN_21_ROW1__FUNC_EINT19_1X (MTK_PIN_NO(21) | 2) | ||
| 121 | #define MT6397_PIN_21_ROW1__FUNC_SDA0_3X (MTK_PIN_NO(21) | 3) | ||
| 122 | #define MT6397_PIN_21_ROW1__FUNC_AUD_TSTCK (MTK_PIN_NO(21) | 4) | ||
| 123 | #define MT6397_PIN_21_ROW1__FUNC_TEST_IN12 (MTK_PIN_NO(21) | 6) | ||
| 124 | #define MT6397_PIN_21_ROW1__FUNC_TEST_OUT12 (MTK_PIN_NO(21) | 7) | ||
| 125 | |||
| 126 | #define MT6397_PIN_22_ROW2__FUNC_GPIO22 (MTK_PIN_NO(22) | 0) | ||
| 127 | #define MT6397_PIN_22_ROW2__FUNC_ROW2 (MTK_PIN_NO(22) | 1) | ||
| 128 | #define MT6397_PIN_22_ROW2__FUNC_EINT20_1X (MTK_PIN_NO(22) | 2) | ||
| 129 | #define MT6397_PIN_22_ROW2__FUNC_SCL1_3X (MTK_PIN_NO(22) | 3) | ||
| 130 | #define MT6397_PIN_22_ROW2__FUNC_TEST_IN13 (MTK_PIN_NO(22) | 6) | ||
| 131 | #define MT6397_PIN_22_ROW2__FUNC_TEST_OUT13 (MTK_PIN_NO(22) | 7) | ||
| 132 | |||
| 133 | #define MT6397_PIN_23_ROW3__FUNC_GPIO23 (MTK_PIN_NO(23) | 0) | ||
| 134 | #define MT6397_PIN_23_ROW3__FUNC_ROW3 (MTK_PIN_NO(23) | 1) | ||
| 135 | #define MT6397_PIN_23_ROW3__FUNC_EINT21_1X (MTK_PIN_NO(23) | 2) | ||
| 136 | #define MT6397_PIN_23_ROW3__FUNC_SDA1_3X (MTK_PIN_NO(23) | 3) | ||
| 137 | #define MT6397_PIN_23_ROW3__FUNC_TEST_IN14 (MTK_PIN_NO(23) | 6) | ||
| 138 | #define MT6397_PIN_23_ROW3__FUNC_TEST_OUT14 (MTK_PIN_NO(23) | 7) | ||
| 139 | |||
| 140 | #define MT6397_PIN_24_ROW4__FUNC_GPIO24 (MTK_PIN_NO(24) | 0) | ||
| 141 | #define MT6397_PIN_24_ROW4__FUNC_ROW4 (MTK_PIN_NO(24) | 1) | ||
| 142 | #define MT6397_PIN_24_ROW4__FUNC_EINT22_1X (MTK_PIN_NO(24) | 2) | ||
| 143 | #define MT6397_PIN_24_ROW4__FUNC_SCL2_3X (MTK_PIN_NO(24) | 3) | ||
| 144 | #define MT6397_PIN_24_ROW4__FUNC_TEST_IN15 (MTK_PIN_NO(24) | 6) | ||
| 145 | #define MT6397_PIN_24_ROW4__FUNC_TEST_OUT15 (MTK_PIN_NO(24) | 7) | ||
| 146 | |||
| 147 | #define MT6397_PIN_25_ROW5__FUNC_GPIO25 (MTK_PIN_NO(25) | 0) | ||
| 148 | #define MT6397_PIN_25_ROW5__FUNC_ROW5 (MTK_PIN_NO(25) | 1) | ||
| 149 | #define MT6397_PIN_25_ROW5__FUNC_EINT23_1X (MTK_PIN_NO(25) | 2) | ||
| 150 | #define MT6397_PIN_25_ROW5__FUNC_SDA2_3X (MTK_PIN_NO(25) | 3) | ||
| 151 | #define MT6397_PIN_25_ROW5__FUNC_TEST_IN16 (MTK_PIN_NO(25) | 6) | ||
| 152 | #define MT6397_PIN_25_ROW5__FUNC_TEST_OUT16 (MTK_PIN_NO(25) | 7) | ||
| 153 | |||
| 154 | #define MT6397_PIN_26_ROW6__FUNC_GPIO26 (MTK_PIN_NO(26) | 0) | ||
| 155 | #define MT6397_PIN_26_ROW6__FUNC_ROW6 (MTK_PIN_NO(26) | 1) | ||
| 156 | #define MT6397_PIN_26_ROW6__FUNC_EINT24_1X (MTK_PIN_NO(26) | 2) | ||
| 157 | #define MT6397_PIN_26_ROW6__FUNC_PWM3_3X (MTK_PIN_NO(26) | 3) | ||
| 158 | #define MT6397_PIN_26_ROW6__FUNC_GPIO32K_2 (MTK_PIN_NO(26) | 4) | ||
| 159 | #define MT6397_PIN_26_ROW6__FUNC_GPIO26M_2 (MTK_PIN_NO(26) | 5) | ||
| 160 | #define MT6397_PIN_26_ROW6__FUNC_TEST_IN17 (MTK_PIN_NO(26) | 6) | ||
| 161 | #define MT6397_PIN_26_ROW6__FUNC_TEST_OUT17 (MTK_PIN_NO(26) | 7) | ||
| 162 | |||
| 163 | #define MT6397_PIN_27_ROW7__FUNC_GPIO27 (MTK_PIN_NO(27) | 0) | ||
| 164 | #define MT6397_PIN_27_ROW7__FUNC_ROW7 (MTK_PIN_NO(27) | 1) | ||
| 165 | #define MT6397_PIN_27_ROW7__FUNC_EINT3_1X (MTK_PIN_NO(27) | 2) | ||
| 166 | #define MT6397_PIN_27_ROW7__FUNC_CBUS (MTK_PIN_NO(27) | 3) | ||
| 167 | #define MT6397_PIN_27_ROW7__FUNC_GPIO32K_3 (MTK_PIN_NO(27) | 4) | ||
| 168 | #define MT6397_PIN_27_ROW7__FUNC_GPIO26M_3 (MTK_PIN_NO(27) | 5) | ||
| 169 | #define MT6397_PIN_27_ROW7__FUNC_TEST_IN18 (MTK_PIN_NO(27) | 6) | ||
| 170 | #define MT6397_PIN_27_ROW7__FUNC_TEST_OUT18 (MTK_PIN_NO(27) | 7) | ||
| 171 | |||
| 172 | #define MT6397_PIN_28_PWM1__FUNC_GPIO28 (MTK_PIN_NO(28) | 0) | ||
| 173 | #define MT6397_PIN_28_PWM1__FUNC_PWM1 (MTK_PIN_NO(28) | 1) | ||
| 174 | #define MT6397_PIN_28_PWM1__FUNC_EINT4_1X (MTK_PIN_NO(28) | 2) | ||
| 175 | #define MT6397_PIN_28_PWM1__FUNC_GPIO32K_4 (MTK_PIN_NO(28) | 4) | ||
| 176 | #define MT6397_PIN_28_PWM1__FUNC_GPIO26M_4 (MTK_PIN_NO(28) | 5) | ||
| 177 | #define MT6397_PIN_28_PWM1__FUNC_TEST_IN19 (MTK_PIN_NO(28) | 6) | ||
| 178 | #define MT6397_PIN_28_PWM1__FUNC_TEST_OUT19 (MTK_PIN_NO(28) | 7) | ||
| 179 | |||
| 180 | #define MT6397_PIN_29_PWM2__FUNC_GPIO29 (MTK_PIN_NO(29) | 0) | ||
| 181 | #define MT6397_PIN_29_PWM2__FUNC_PWM2 (MTK_PIN_NO(29) | 1) | ||
| 182 | #define MT6397_PIN_29_PWM2__FUNC_EINT5_1X (MTK_PIN_NO(29) | 2) | ||
| 183 | #define MT6397_PIN_29_PWM2__FUNC_GPIO32K_5 (MTK_PIN_NO(29) | 4) | ||
| 184 | #define MT6397_PIN_29_PWM2__FUNC_GPIO26M_5 (MTK_PIN_NO(29) | 5) | ||
| 185 | #define MT6397_PIN_29_PWM2__FUNC_TEST_IN20 (MTK_PIN_NO(29) | 6) | ||
| 186 | #define MT6397_PIN_29_PWM2__FUNC_TEST_OUT20 (MTK_PIN_NO(29) | 7) | ||
| 187 | |||
| 188 | #define MT6397_PIN_30_PWM3__FUNC_GPIO30 (MTK_PIN_NO(30) | 0) | ||
| 189 | #define MT6397_PIN_30_PWM3__FUNC_PWM3 (MTK_PIN_NO(30) | 1) | ||
| 190 | #define MT6397_PIN_30_PWM3__FUNC_EINT6_1X (MTK_PIN_NO(30) | 2) | ||
| 191 | #define MT6397_PIN_30_PWM3__FUNC_COL0 (MTK_PIN_NO(30) | 3) | ||
| 192 | #define MT6397_PIN_30_PWM3__FUNC_GPIO32K_6 (MTK_PIN_NO(30) | 4) | ||
| 193 | #define MT6397_PIN_30_PWM3__FUNC_GPIO26M_6 (MTK_PIN_NO(30) | 5) | ||
| 194 | #define MT6397_PIN_30_PWM3__FUNC_TEST_IN21 (MTK_PIN_NO(30) | 6) | ||
| 195 | #define MT6397_PIN_30_PWM3__FUNC_TEST_OUT21 (MTK_PIN_NO(30) | 7) | ||
| 196 | |||
| 197 | #define MT6397_PIN_31_SCL0__FUNC_GPIO31 (MTK_PIN_NO(31) | 0) | ||
| 198 | #define MT6397_PIN_31_SCL0__FUNC_SCL0 (MTK_PIN_NO(31) | 1) | ||
| 199 | #define MT6397_PIN_31_SCL0__FUNC_EINT7_1X (MTK_PIN_NO(31) | 2) | ||
| 200 | #define MT6397_PIN_31_SCL0__FUNC_PWM1_2X (MTK_PIN_NO(31) | 3) | ||
| 201 | #define MT6397_PIN_31_SCL0__FUNC_TEST_IN22 (MTK_PIN_NO(31) | 6) | ||
| 202 | #define MT6397_PIN_31_SCL0__FUNC_TEST_OUT22 (MTK_PIN_NO(31) | 7) | ||
| 203 | |||
| 204 | #define MT6397_PIN_32_SDA0__FUNC_GPIO32 (MTK_PIN_NO(32) | 0) | ||
| 205 | #define MT6397_PIN_32_SDA0__FUNC_SDA0 (MTK_PIN_NO(32) | 1) | ||
| 206 | #define MT6397_PIN_32_SDA0__FUNC_EINT8_1X (MTK_PIN_NO(32) | 2) | ||
| 207 | #define MT6397_PIN_32_SDA0__FUNC_TEST_IN23 (MTK_PIN_NO(32) | 6) | ||
| 208 | #define MT6397_PIN_32_SDA0__FUNC_TEST_OUT23 (MTK_PIN_NO(32) | 7) | ||
| 209 | |||
| 210 | #define MT6397_PIN_33_SCL1__FUNC_GPIO33 (MTK_PIN_NO(33) | 0) | ||
| 211 | #define MT6397_PIN_33_SCL1__FUNC_SCL1 (MTK_PIN_NO(33) | 1) | ||
| 212 | #define MT6397_PIN_33_SCL1__FUNC_EINT9_1X (MTK_PIN_NO(33) | 2) | ||
| 213 | #define MT6397_PIN_33_SCL1__FUNC_PWM2_2X (MTK_PIN_NO(33) | 3) | ||
| 214 | #define MT6397_PIN_33_SCL1__FUNC_TEST_IN24 (MTK_PIN_NO(33) | 6) | ||
| 215 | #define MT6397_PIN_33_SCL1__FUNC_TEST_OUT24 (MTK_PIN_NO(33) | 7) | ||
| 216 | |||
| 217 | #define MT6397_PIN_34_SDA1__FUNC_GPIO34 (MTK_PIN_NO(34) | 0) | ||
| 218 | #define MT6397_PIN_34_SDA1__FUNC_SDA1 (MTK_PIN_NO(34) | 1) | ||
| 219 | #define MT6397_PIN_34_SDA1__FUNC_EINT0_1X (MTK_PIN_NO(34) | 2) | ||
| 220 | #define MT6397_PIN_34_SDA1__FUNC_TEST_IN25 (MTK_PIN_NO(34) | 6) | ||
| 221 | #define MT6397_PIN_34_SDA1__FUNC_TEST_OUT25 (MTK_PIN_NO(34) | 7) | ||
| 222 | |||
| 223 | #define MT6397_PIN_35_SCL2__FUNC_GPIO35 (MTK_PIN_NO(35) | 0) | ||
| 224 | #define MT6397_PIN_35_SCL2__FUNC_SCL2 (MTK_PIN_NO(35) | 1) | ||
| 225 | #define MT6397_PIN_35_SCL2__FUNC_EINT1_1X (MTK_PIN_NO(35) | 2) | ||
| 226 | #define MT6397_PIN_35_SCL2__FUNC_PWM3_2X (MTK_PIN_NO(35) | 3) | ||
| 227 | #define MT6397_PIN_35_SCL2__FUNC_TEST_IN26 (MTK_PIN_NO(35) | 6) | ||
| 228 | #define MT6397_PIN_35_SCL2__FUNC_TEST_OUT26 (MTK_PIN_NO(35) | 7) | ||
| 229 | |||
| 230 | #define MT6397_PIN_36_SDA2__FUNC_GPIO36 (MTK_PIN_NO(36) | 0) | ||
| 231 | #define MT6397_PIN_36_SDA2__FUNC_SDA2 (MTK_PIN_NO(36) | 1) | ||
| 232 | #define MT6397_PIN_36_SDA2__FUNC_EINT2_1X (MTK_PIN_NO(36) | 2) | ||
| 233 | #define MT6397_PIN_36_SDA2__FUNC_TEST_IN27 (MTK_PIN_NO(36) | 6) | ||
| 234 | #define MT6397_PIN_36_SDA2__FUNC_TEST_OUT27 (MTK_PIN_NO(36) | 7) | ||
| 235 | |||
| 236 | #define MT6397_PIN_37_HDMISD__FUNC_GPIO37 (MTK_PIN_NO(37) | 0) | ||
| 237 | #define MT6397_PIN_37_HDMISD__FUNC_HDMISD (MTK_PIN_NO(37) | 1) | ||
| 238 | #define MT6397_PIN_37_HDMISD__FUNC_TEST_IN28 (MTK_PIN_NO(37) | 6) | ||
| 239 | #define MT6397_PIN_37_HDMISD__FUNC_TEST_OUT28 (MTK_PIN_NO(37) | 7) | ||
| 240 | |||
| 241 | #define MT6397_PIN_38_HDMISCK__FUNC_GPIO38 (MTK_PIN_NO(38) | 0) | ||
| 242 | #define MT6397_PIN_38_HDMISCK__FUNC_HDMISCK (MTK_PIN_NO(38) | 1) | ||
| 243 | #define MT6397_PIN_38_HDMISCK__FUNC_TEST_IN29 (MTK_PIN_NO(38) | 6) | ||
| 244 | #define MT6397_PIN_38_HDMISCK__FUNC_TEST_OUT29 (MTK_PIN_NO(38) | 7) | ||
| 245 | |||
| 246 | #define MT6397_PIN_39_HTPLG__FUNC_GPIO39 (MTK_PIN_NO(39) | 0) | ||
| 247 | #define MT6397_PIN_39_HTPLG__FUNC_HTPLG (MTK_PIN_NO(39) | 1) | ||
| 248 | #define MT6397_PIN_39_HTPLG__FUNC_TEST_IN30 (MTK_PIN_NO(39) | 6) | ||
| 249 | #define MT6397_PIN_39_HTPLG__FUNC_TEST_OUT30 (MTK_PIN_NO(39) | 7) | ||
| 250 | |||
| 251 | #define MT6397_PIN_40_CEC__FUNC_GPIO40 (MTK_PIN_NO(40) | 0) | ||
| 252 | #define MT6397_PIN_40_CEC__FUNC_CEC (MTK_PIN_NO(40) | 1) | ||
| 253 | #define MT6397_PIN_40_CEC__FUNC_TEST_IN31 (MTK_PIN_NO(40) | 6) | ||
| 254 | #define MT6397_PIN_40_CEC__FUNC_TEST_OUT31 (MTK_PIN_NO(40) | 7) | ||
| 255 | |||
| 256 | #endif /* __DTS_MT6397_PINFUNC_H */ | ||
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 18eccefea06e..d7e5d608faa7 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -142,7 +142,7 @@ static inline struct pinctrl * __must_check pinctrl_get_select( | |||
| 142 | s = pinctrl_lookup_state(p, name); | 142 | s = pinctrl_lookup_state(p, name); |
| 143 | if (IS_ERR(s)) { | 143 | if (IS_ERR(s)) { |
| 144 | pinctrl_put(p); | 144 | pinctrl_put(p); |
| 145 | return ERR_PTR(PTR_ERR(s)); | 145 | return ERR_CAST(s); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | ret = pinctrl_select_state(p, s); | 148 | ret = pinctrl_select_state(p, s); |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 66e4697516de..9ba59fcba549 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
| @@ -127,7 +127,7 @@ struct pinctrl_ops { | |||
| 127 | */ | 127 | */ |
| 128 | struct pinctrl_desc { | 128 | struct pinctrl_desc { |
| 129 | const char *name; | 129 | const char *name; |
| 130 | struct pinctrl_pin_desc const *pins; | 130 | const struct pinctrl_pin_desc *pins; |
| 131 | unsigned int npins; | 131 | unsigned int npins; |
| 132 | const struct pinctrl_ops *pctlops; | 132 | const struct pinctrl_ops *pctlops; |
| 133 | const struct pinmux_ops *pmxops; | 133 | const struct pinmux_ops *pmxops; |
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h index 511bda9ed4bf..ace60d775b20 100644 --- a/include/linux/pinctrl/pinmux.h +++ b/include/linux/pinctrl/pinmux.h | |||
| @@ -56,6 +56,9 @@ struct pinctrl_dev; | |||
| 56 | * depending on whether the GPIO is configured as input or output, | 56 | * depending on whether the GPIO is configured as input or output, |
| 57 | * a direction selector function may be implemented as a backing | 57 | * a direction selector function may be implemented as a backing |
| 58 | * to the GPIO controllers that need pin muxing. | 58 | * to the GPIO controllers that need pin muxing. |
| 59 | * @strict: do not allow simultaneous use of the same pin for GPIO and another | ||
| 60 | * function. Check both gpio_owner and mux_owner strictly before approving | ||
| 61 | * the pin request. | ||
| 59 | */ | 62 | */ |
| 60 | struct pinmux_ops { | 63 | struct pinmux_ops { |
| 61 | int (*request) (struct pinctrl_dev *pctldev, unsigned offset); | 64 | int (*request) (struct pinctrl_dev *pctldev, unsigned offset); |
| @@ -66,7 +69,7 @@ struct pinmux_ops { | |||
| 66 | int (*get_function_groups) (struct pinctrl_dev *pctldev, | 69 | int (*get_function_groups) (struct pinctrl_dev *pctldev, |
| 67 | unsigned selector, | 70 | unsigned selector, |
| 68 | const char * const **groups, | 71 | const char * const **groups, |
| 69 | unsigned * const num_groups); | 72 | unsigned *num_groups); |
| 70 | int (*set_mux) (struct pinctrl_dev *pctldev, unsigned func_selector, | 73 | int (*set_mux) (struct pinctrl_dev *pctldev, unsigned func_selector, |
| 71 | unsigned group_selector); | 74 | unsigned group_selector); |
| 72 | int (*gpio_request_enable) (struct pinctrl_dev *pctldev, | 75 | int (*gpio_request_enable) (struct pinctrl_dev *pctldev, |
| @@ -79,6 +82,7 @@ struct pinmux_ops { | |||
| 79 | struct pinctrl_gpio_range *range, | 82 | struct pinctrl_gpio_range *range, |
| 80 | unsigned offset, | 83 | unsigned offset, |
| 81 | bool input); | 84 | bool input); |
| 85 | bool strict; | ||
| 82 | }; | 86 | }; |
| 83 | 87 | ||
| 84 | #endif /* CONFIG_PINMUX */ | 88 | #endif /* CONFIG_PINMUX */ |
