Skip to content

Commit 462938c

Browse files
committed
Merge tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: "An assortment of pin control fixes of varying importance, the most important ones affecting Intel and AMD laptops turned up the recent few days so it's time to push this to your tree. - Fix the Kconfig dependency for Qualcomm SM8350 pin controller - Fix pin biasing fallback behaviour on the Mediatek pin controller - Fix the GPIO numbering scheme for Intel Tiger Lake-H to correspond to the products that are now actually out on the market - Fix a pin control function itemization in the Sunxi driver out-of-bounds access bug - Fix disable clocking for the RISC-V K210 pin controller on the errorpath - Fix a system shutdown bug affecting AMD Ryzen-based laptops, the system would not suspend but just bounce back up" * tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: amd: Fix an issue with shutdown when system set to s0ix pinctrl: k210: Fix k210_fpioa_probe() pinctrl: sunxi: Don't underestimate number of functions pinctrl: tigerlake: Fix GPIO mapping for newer version of software pinctrl: mediatek: Fix fallback behavior for bias_set_combo pinctrl: qcom: fix GPIOLIB dependencies
2 parents f8e6dfc + c4b68e5 commit 462938c

File tree

6 files changed

+73
-61
lines changed

6 files changed

+73
-61
lines changed

drivers/pinctrl/intel/pinctrl-tigerlake.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -701,32 +701,32 @@ static const struct pinctrl_pin_desc tglh_pins[] = {
701701

702702
static const struct intel_padgroup tglh_community0_gpps[] = {
703703
TGL_GPP(0, 0, 24, 0), /* GPP_A */
704-
TGL_GPP(1, 25, 44, 128), /* GPP_R */
705-
TGL_GPP(2, 45, 70, 32), /* GPP_B */
706-
TGL_GPP(3, 71, 78, INTEL_GPIO_BASE_NOMAP), /* vGPIO_0 */
704+
TGL_GPP(1, 25, 44, 32), /* GPP_R */
705+
TGL_GPP(2, 45, 70, 64), /* GPP_B */
706+
TGL_GPP(3, 71, 78, 96), /* vGPIO_0 */
707707
};
708708

709709
static const struct intel_padgroup tglh_community1_gpps[] = {
710-
TGL_GPP(0, 79, 104, 96), /* GPP_D */
711-
TGL_GPP(1, 105, 128, 64), /* GPP_C */
712-
TGL_GPP(2, 129, 136, 160), /* GPP_S */
713-
TGL_GPP(3, 137, 153, 192), /* GPP_G */
714-
TGL_GPP(4, 154, 180, 224), /* vGPIO */
710+
TGL_GPP(0, 79, 104, 128), /* GPP_D */
711+
TGL_GPP(1, 105, 128, 160), /* GPP_C */
712+
TGL_GPP(2, 129, 136, 192), /* GPP_S */
713+
TGL_GPP(3, 137, 153, 224), /* GPP_G */
714+
TGL_GPP(4, 154, 180, 256), /* vGPIO */
715715
};
716716

717717
static const struct intel_padgroup tglh_community3_gpps[] = {
718-
TGL_GPP(0, 181, 193, 256), /* GPP_E */
719-
TGL_GPP(1, 194, 217, 288), /* GPP_F */
718+
TGL_GPP(0, 181, 193, 288), /* GPP_E */
719+
TGL_GPP(1, 194, 217, 320), /* GPP_F */
720720
};
721721

722722
static const struct intel_padgroup tglh_community4_gpps[] = {
723-
TGL_GPP(0, 218, 241, 320), /* GPP_H */
723+
TGL_GPP(0, 218, 241, 352), /* GPP_H */
724724
TGL_GPP(1, 242, 251, 384), /* GPP_J */
725-
TGL_GPP(2, 252, 266, 352), /* GPP_K */
725+
TGL_GPP(2, 252, 266, 416), /* GPP_K */
726726
};
727727

728728
static const struct intel_padgroup tglh_community5_gpps[] = {
729-
TGL_GPP(0, 267, 281, 416), /* GPP_I */
729+
TGL_GPP(0, 267, 281, 448), /* GPP_I */
730730
TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */
731731
};
732732

drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -925,12 +925,10 @@ int mtk_pinconf_adv_pull_set(struct mtk_pinctrl *hw,
925925
err = hw->soc->bias_set(hw, desc, pullup);
926926
if (err)
927927
return err;
928-
} else if (hw->soc->bias_set_combo) {
929-
err = hw->soc->bias_set_combo(hw, desc, pullup, arg);
930-
if (err)
931-
return err;
932928
} else {
933-
return -ENOTSUPP;
929+
err = mtk_pinconf_bias_set_rev1(hw, desc, pullup);
930+
if (err)
931+
err = mtk_pinconf_bias_set(hw, desc, pullup);
934932
}
935933
}
936934

drivers/pinctrl/pinctrl-amd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
444444
unsigned long flags;
445445
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
446446
struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
447-
u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
448-
BIT(WAKE_CNTRL_OFF_S4);
447+
u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3);
449448

450449
raw_spin_lock_irqsave(&gpio_dev->lock, flags);
451450
pin_reg = readl(gpio_dev->base + (d->hwirq)*4);

drivers/pinctrl/pinctrl-k210.c

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -950,23 +950,37 @@ static int k210_fpioa_probe(struct platform_device *pdev)
950950
return ret;
951951

952952
pdata->pclk = devm_clk_get_optional(dev, "pclk");
953-
if (!IS_ERR(pdata->pclk))
954-
clk_prepare_enable(pdata->pclk);
953+
if (!IS_ERR(pdata->pclk)) {
954+
ret = clk_prepare_enable(pdata->pclk);
955+
if (ret)
956+
goto disable_clk;
957+
}
955958

956959
pdata->sysctl_map =
957960
syscon_regmap_lookup_by_phandle_args(np,
958961
"canaan,k210-sysctl-power",
959962
1, &pdata->power_offset);
960-
if (IS_ERR(pdata->sysctl_map))
961-
return PTR_ERR(pdata->sysctl_map);
963+
if (IS_ERR(pdata->sysctl_map)) {
964+
ret = PTR_ERR(pdata->sysctl_map);
965+
goto disable_pclk;
966+
}
962967

963968
k210_fpioa_init_ties(pdata);
964969

965970
pdata->pctl = pinctrl_register(&k210_pinctrl_desc, dev, (void *)pdata);
966-
if (IS_ERR(pdata->pctl))
967-
return PTR_ERR(pdata->pctl);
971+
if (IS_ERR(pdata->pctl)) {
972+
ret = PTR_ERR(pdata->pctl);
973+
goto disable_pclk;
974+
}
968975

969976
return 0;
977+
978+
disable_pclk:
979+
clk_disable_unprepare(pdata->pclk);
980+
disable_clk:
981+
clk_disable_unprepare(pdata->clk);
982+
983+
return ret;
970984
}
971985

972986
static const struct of_device_id k210_fpioa_dt_ids[] = {

drivers/pinctrl/qcom/Kconfig

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,39 @@ config PINCTRL_MSM
1313

1414
config PINCTRL_APQ8064
1515
tristate "Qualcomm APQ8064 pin controller driver"
16-
depends on GPIOLIB && OF
16+
depends on OF
1717
depends on PINCTRL_MSM
1818
help
1919
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
2020
Qualcomm TLMM block found in the Qualcomm APQ8064 platform.
2121

2222
config PINCTRL_APQ8084
2323
tristate "Qualcomm APQ8084 pin controller driver"
24-
depends on GPIOLIB && OF
24+
depends on OF
2525
depends on PINCTRL_MSM
2626
help
2727
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
2828
Qualcomm TLMM block found in the Qualcomm APQ8084 platform.
2929

3030
config PINCTRL_IPQ4019
3131
tristate "Qualcomm IPQ4019 pin controller driver"
32-
depends on GPIOLIB && OF
32+
depends on OF
3333
depends on PINCTRL_MSM
3434
help
3535
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
3636
Qualcomm TLMM block found in the Qualcomm IPQ4019 platform.
3737

3838
config PINCTRL_IPQ8064
3939
tristate "Qualcomm IPQ8064 pin controller driver"
40-
depends on GPIOLIB && OF
40+
depends on OF
4141
depends on PINCTRL_MSM
4242
help
4343
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
4444
Qualcomm TLMM block found in the Qualcomm IPQ8064 platform.
4545

4646
config PINCTRL_IPQ8074
4747
tristate "Qualcomm Technologies, Inc. IPQ8074 pin controller driver"
48-
depends on GPIOLIB && OF
48+
depends on OF
4949
depends on PINCTRL_MSM
5050
help
5151
This is the pinctrl, pinmux, pinconf and gpiolib driver for
@@ -55,7 +55,7 @@ config PINCTRL_IPQ8074
5555

5656
config PINCTRL_IPQ6018
5757
tristate "Qualcomm Technologies, Inc. IPQ6018 pin controller driver"
58-
depends on GPIOLIB && OF
58+
depends on OF
5959
depends on PINCTRL_MSM
6060
help
6161
This is the pinctrl, pinmux, pinconf and gpiolib driver for
@@ -65,7 +65,7 @@ config PINCTRL_IPQ6018
6565

6666
config PINCTRL_MSM8226
6767
tristate "Qualcomm 8226 pin controller driver"
68-
depends on GPIOLIB && OF
68+
depends on OF
6969
depends on PINCTRL_MSM
7070
help
7171
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -74,47 +74,47 @@ config PINCTRL_MSM8226
7474

7575
config PINCTRL_MSM8660
7676
tristate "Qualcomm 8660 pin controller driver"
77-
depends on GPIOLIB && OF
77+
depends on OF
7878
depends on PINCTRL_MSM
7979
help
8080
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
8181
Qualcomm TLMM block found in the Qualcomm 8660 platform.
8282

8383
config PINCTRL_MSM8960
8484
tristate "Qualcomm 8960 pin controller driver"
85-
depends on GPIOLIB && OF
85+
depends on OF
8686
depends on PINCTRL_MSM
8787
help
8888
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
8989
Qualcomm TLMM block found in the Qualcomm 8960 platform.
9090

9191
config PINCTRL_MDM9615
9292
tristate "Qualcomm 9615 pin controller driver"
93-
depends on GPIOLIB && OF
93+
depends on OF
9494
depends on PINCTRL_MSM
9595
help
9696
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
9797
Qualcomm TLMM block found in the Qualcomm 9615 platform.
9898

9999
config PINCTRL_MSM8X74
100100
tristate "Qualcomm 8x74 pin controller driver"
101-
depends on GPIOLIB && OF
101+
depends on OF
102102
depends on PINCTRL_MSM
103103
help
104104
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
105105
Qualcomm TLMM block found in the Qualcomm 8974 platform.
106106

107107
config PINCTRL_MSM8916
108108
tristate "Qualcomm 8916 pin controller driver"
109-
depends on GPIOLIB && OF
109+
depends on OF
110110
depends on PINCTRL_MSM
111111
help
112112
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
113113
Qualcomm TLMM block found on the Qualcomm 8916 platform.
114114

115115
config PINCTRL_MSM8953
116116
tristate "Qualcomm 8953 pin controller driver"
117-
depends on GPIOLIB && OF
117+
depends on OF
118118
depends on PINCTRL_MSM
119119
help
120120
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -124,7 +124,7 @@ config PINCTRL_MSM8953
124124

125125
config PINCTRL_MSM8976
126126
tristate "Qualcomm 8976 pin controller driver"
127-
depends on GPIOLIB && OF
127+
depends on OF
128128
depends on PINCTRL_MSM
129129
help
130130
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -134,7 +134,7 @@ config PINCTRL_MSM8976
134134

135135
config PINCTRL_MSM8994
136136
tristate "Qualcomm 8994 pin controller driver"
137-
depends on GPIOLIB && OF
137+
depends on OF
138138
depends on PINCTRL_MSM
139139
help
140140
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -143,39 +143,39 @@ config PINCTRL_MSM8994
143143

144144
config PINCTRL_MSM8996
145145
tristate "Qualcomm MSM8996 pin controller driver"
146-
depends on GPIOLIB && OF
146+
depends on OF
147147
depends on PINCTRL_MSM
148148
help
149149
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
150150
Qualcomm TLMM block found in the Qualcomm MSM8996 platform.
151151

152152
config PINCTRL_MSM8998
153153
tristate "Qualcomm MSM8998 pin controller driver"
154-
depends on GPIOLIB && OF
154+
depends on OF
155155
depends on PINCTRL_MSM
156156
help
157157
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
158158
Qualcomm TLMM block found in the Qualcomm MSM8998 platform.
159159

160160
config PINCTRL_QCS404
161161
tristate "Qualcomm QCS404 pin controller driver"
162-
depends on GPIOLIB && OF
162+
depends on OF
163163
depends on PINCTRL_MSM
164164
help
165165
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
166166
TLMM block found in the Qualcomm QCS404 platform.
167167

168168
config PINCTRL_QDF2XXX
169169
tristate "Qualcomm Technologies QDF2xxx pin controller driver"
170-
depends on GPIOLIB && ACPI
170+
depends on ACPI
171171
depends on PINCTRL_MSM
172172
help
173173
This is the GPIO driver for the TLMM block found on the
174174
Qualcomm Technologies QDF2xxx SOCs.
175175

176176
config PINCTRL_QCOM_SPMI_PMIC
177177
tristate "Qualcomm SPMI PMIC pin controller driver"
178-
depends on GPIOLIB && OF && SPMI
178+
depends on OF && SPMI
179179
select REGMAP_SPMI
180180
select PINMUX
181181
select PINCONF
@@ -190,7 +190,7 @@ config PINCTRL_QCOM_SPMI_PMIC
190190

191191
config PINCTRL_QCOM_SSBI_PMIC
192192
tristate "Qualcomm SSBI PMIC pin controller driver"
193-
depends on GPIOLIB && OF
193+
depends on OF
194194
select PINMUX
195195
select PINCONF
196196
select GENERIC_PINCONF
@@ -204,7 +204,7 @@ config PINCTRL_QCOM_SSBI_PMIC
204204

205205
config PINCTRL_SC7180
206206
tristate "Qualcomm Technologies Inc SC7180 pin controller driver"
207-
depends on GPIOLIB && OF
207+
depends on OF
208208
depends on PINCTRL_MSM
209209
help
210210
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -213,7 +213,7 @@ config PINCTRL_SC7180
213213

214214
config PINCTRL_SC7280
215215
tristate "Qualcomm Technologies Inc SC7280 pin controller driver"
216-
depends on GPIOLIB && OF
216+
depends on OF
217217
depends on PINCTRL_MSM
218218
help
219219
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -222,7 +222,7 @@ config PINCTRL_SC7280
222222

223223
config PINCTRL_SC8180X
224224
tristate "Qualcomm Technologies Inc SC8180x pin controller driver"
225-
depends on GPIOLIB && (OF || ACPI)
225+
depends on (OF || ACPI)
226226
depends on PINCTRL_MSM
227227
help
228228
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -231,7 +231,7 @@ config PINCTRL_SC8180X
231231

232232
config PINCTRL_SDM660
233233
tristate "Qualcomm Technologies Inc SDM660 pin controller driver"
234-
depends on GPIOLIB && OF
234+
depends on OF
235235
depends on PINCTRL_MSM
236236
help
237237
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -240,7 +240,7 @@ config PINCTRL_SDM660
240240

241241
config PINCTRL_SDM845
242242
tristate "Qualcomm Technologies Inc SDM845 pin controller driver"
243-
depends on GPIOLIB && (OF || ACPI)
243+
depends on (OF || ACPI)
244244
depends on PINCTRL_MSM
245245
help
246246
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -249,7 +249,7 @@ config PINCTRL_SDM845
249249

250250
config PINCTRL_SDX55
251251
tristate "Qualcomm Technologies Inc SDX55 pin controller driver"
252-
depends on GPIOLIB && OF
252+
depends on OF
253253
depends on PINCTRL_MSM
254254
help
255255
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -258,7 +258,7 @@ config PINCTRL_SDX55
258258

259259
config PINCTRL_SM6125
260260
tristate "Qualcomm Technologies Inc SM6125 pin controller driver"
261-
depends on GPIOLIB && OF
261+
depends on OF
262262
depends on PINCTRL_MSM
263263
help
264264
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -267,7 +267,7 @@ config PINCTRL_SM6125
267267

268268
config PINCTRL_SM8150
269269
tristate "Qualcomm Technologies Inc SM8150 pin controller driver"
270-
depends on GPIOLIB && OF
270+
depends on OF
271271
depends on PINCTRL_MSM
272272
help
273273
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -276,7 +276,7 @@ config PINCTRL_SM8150
276276

277277
config PINCTRL_SM8250
278278
tristate "Qualcomm Technologies Inc SM8250 pin controller driver"
279-
depends on GPIOLIB && OF
279+
depends on OF
280280
depends on PINCTRL_MSM
281281
help
282282
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
@@ -285,8 +285,7 @@ config PINCTRL_SM8250
285285

286286
config PINCTRL_SM8350
287287
tristate "Qualcomm Technologies Inc SM8350 pin controller driver"
288-
depends on GPIOLIB && OF
289-
select PINCTRL_MSM
288+
depends on PINCTRL_MSM
290289
help
291290
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
292291
Qualcomm Technologies Inc TLMM block found on the Qualcomm

0 commit comments

Comments
 (0)