Skip to content

Commit 94bc967

Browse files
committed
Merge tag 'samsung-pinctrl-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel
Samsung pinctrl drivers changes for v6.1 1. Minor fix in order of initializing pinctrl driver - GPIOs should be configured before registering gpiolib. 2. Final steps to deprecated bindings headers with register constants. The constants were moved to include files in DTS directories, because these are not suitable for bindings. Remove final references and mark binding header as deprecated to warn any users.
2 parents 3f66836 + 9d92925 commit 94bc967

File tree

4 files changed

+38
-41
lines changed

4 files changed

+38
-41
lines changed

Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-pins-cfg.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ description: |
2020
The values used for config properties should be derived from the hardware
2121
manual and these values are programmed as-is into the pin pull up/down and
2222
driver strength register of the pin-controller.
23-
See also include/dt-bindings/pinctrl/samsung.h with useful constants.
2423
2524
See also Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml for
2625
additional information and example.

Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ description: |
1515
This is a part of device tree bindings for Samsung S3C/S5P/Exynos SoC pin
1616
controller.
1717
18-
Pin group settings (like drive strength, pull up/down) are available as
19-
macros in include/dt-bindings/pinctrl/samsung.h.
20-
2118
All the pin controller nodes should be represented in the aliases node using
2219
the following format 'pinctrl{n}' where n is a unique number for the alias.
2320
@@ -141,8 +138,6 @@ additionalProperties: false
141138

142139
examples:
143140
- |
144-
#include <dt-bindings/pinctrl/samsung.h>
145-
146141
pinctrl@7f008000 {
147142
compatible = "samsung,s3c64xx-pinctrl";
148143
reg = <0x7f008000 0x1000>;
@@ -169,16 +164,15 @@ examples:
169164
170165
uart0-data-pins {
171166
samsung,pins = "gpa-0", "gpa-1";
172-
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
173-
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
167+
samsung,pin-function = <2>;
168+
samsung,pin-pud = <0>;
174169
};
175170
176171
// ...
177172
};
178173
179174
- |
180175
#include <dt-bindings/interrupt-controller/arm-gic.h>
181-
#include <dt-bindings/pinctrl/samsung.h>
182176
183177
pinctrl@11400000 {
184178
compatible = "samsung,exynos4210-pinctrl";
@@ -200,24 +194,24 @@ examples:
200194
201195
uart0-data-pins {
202196
samsung,pins = "gpa0-0", "gpa0-1";
203-
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
204-
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
205-
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
197+
samsung,pin-function = <2>;
198+
samsung,pin-pud = <0>;
199+
samsung,pin-drv = <0>;
206200
};
207201
208202
// ...
209203
210204
sleep0: sleep-state {
211205
gpa0-0-pin {
212206
samsung,pins = "gpa0-0";
213-
samsung,pin-con-pdn = <EXYNOS_PIN_PDN_INPUT>;
214-
samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>;
207+
samsung,pin-con-pdn = <2>;
208+
samsung,pin-pud-pdn = <0>;
215209
};
216210
217211
gpa0-1-pin {
218212
samsung,pins = "gpa0-1";
219-
samsung,pin-con-pdn = <EXYNOS_PIN_PDN_OUT0>;
220-
samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>;
213+
samsung,pin-con-pdn = <0>;
214+
samsung,pin-pud-pdn = <0>;
221215
};
222216
223217
// ...
@@ -226,7 +220,6 @@ examples:
226220
227221
- |
228222
#include <dt-bindings/interrupt-controller/arm-gic.h>
229-
#include <dt-bindings/pinctrl/samsung.h>
230223
231224
pinctrl@11000000 {
232225
compatible = "samsung,exynos4210-pinctrl";
@@ -275,43 +268,42 @@ examples:
275268
276269
sd0-clk-pins {
277270
samsung,pins = "gpk0-0";
278-
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
279-
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
280-
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
271+
samsung,pin-function = <2>;
272+
samsung,pin-pud = <0>;
273+
samsung,pin-drv = <3>;
281274
};
282275
283276
sd4-bus-width8-pins {
284277
part-1-pins {
285278
samsung,pins = "gpk0-3", "gpk0-4",
286279
"gpk0-5", "gpk0-6";
287-
samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
288-
samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
289-
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
280+
samsung,pin-function = <3>;
281+
samsung,pin-pud = <3>;
282+
samsung,pin-drv = <3>;
290283
};
291284
292285
part-2-pins {
293286
samsung,pins = "gpk1-3", "gpk1-4",
294287
"gpk1-5", "gpk1-6";
295-
samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
296-
samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
297-
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
288+
samsung,pin-function = <4>;
289+
samsung,pin-pud = <3>;
290+
samsung,pin-drv = <3>;
298291
};
299292
};
300293
301294
// ...
302295
303296
otg-gp-pins {
304297
samsung,pins = "gpx3-3";
305-
samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
306-
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
307-
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
298+
samsung,pin-function = <1>;
299+
samsung,pin-pud = <0>;
300+
samsung,pin-drv = <0>;
308301
samsung,pin-val = <0>;
309302
};
310303
};
311304
312305
- |
313306
#include <dt-bindings/interrupt-controller/arm-gic.h>
314-
#include <dt-bindings/pinctrl/samsung.h>
315307
316308
pinctrl@10580000 {
317309
compatible = "samsung,exynos5433-pinctrl";
@@ -355,9 +347,9 @@ examples:
355347
initial_alive: initial-state {
356348
gpa0-0-pin {
357349
samsung,pins = "gpa0-0";
358-
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
359-
samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
360-
samsung,pin-drv = <EXYNOS5433_PIN_DRV_FAST_SR1>;
350+
samsung,pin-function = <0>;
351+
samsung,pin-pud = <1>;
352+
samsung,pin-drv = <0>;
361353
};
362354
363355
// ...
@@ -366,7 +358,6 @@ examples:
366358
367359
- |
368360
#include <dt-bindings/interrupt-controller/arm-gic.h>
369-
#include <dt-bindings/pinctrl/samsung.h>
370361
371362
pinctrl@114b0000 {
372363
compatible = "samsung,exynos5433-pinctrl";
@@ -387,9 +378,9 @@ examples:
387378
i2s0-bus-pins {
388379
samsung,pins = "gpz0-0", "gpz0-1", "gpz0-2", "gpz0-3",
389380
"gpz0-4", "gpz0-5", "gpz0-6";
390-
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
391-
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
392-
samsung,pin-drv = <EXYNOS5433_PIN_DRV_FAST_SR1>;
381+
samsung,pin-function = <2>;
382+
samsung,pin-pud = <0>;
383+
samsung,pin-drv = <0>;
393384
};
394385
395386
// ...

drivers/pinctrl/samsung/pinctrl-samsung.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,15 +1166,15 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
11661166
if (ret)
11671167
goto err_put_banks;
11681168

1169-
ret = samsung_gpiolib_register(pdev, drvdata);
1170-
if (ret)
1171-
goto err_unregister;
1172-
11731169
if (ctrl->eint_gpio_init)
11741170
ctrl->eint_gpio_init(drvdata);
11751171
if (ctrl->eint_wkup_init)
11761172
ctrl->eint_wkup_init(drvdata);
11771173

1174+
ret = samsung_gpiolib_register(pdev, drvdata);
1175+
if (ret)
1176+
goto err_unregister;
1177+
11781178
platform_set_drvdata(pdev, drvdata);
11791179

11801180
return 0;

include/dt-bindings/pinctrl/samsung.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#ifndef __DT_BINDINGS_PINCTRL_SAMSUNG_H__
1111
#define __DT_BINDINGS_PINCTRL_SAMSUNG_H__
1212

13+
/*
14+
* These bindings are deprecated, because they do not match the actual
15+
* concept of bindings but rather contain pure register values.
16+
* Instead include the header in the DTS source directory.
17+
*/
18+
#warning "These bindings are deprecated. Instead use the header in the DTS source directory."
19+
1320
#define EXYNOS_PIN_PULL_NONE 0
1421
#define EXYNOS_PIN_PULL_DOWN 1
1522
#define EXYNOS_PIN_PULL_UP 3

0 commit comments

Comments
 (0)