Skip to contentSkip to conversation

arm64: dts: ti: k3-pinctrl: some minor cleanup

PATCH Applied Rasmus Villemoes 2 participants 4 messages Mar 27 – Mar 29

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: ti: k3-pinctrl: some minor cleanup

I stumbled on a few things one might want to clean up. No functional change.

Rasmus Villemoes (2):
arm64: dts: ti: k3-pinctrl: consistently use tabs for alignment
arm64: dts: ti: k3-pinctrl: sort shift values numerically

 arch/arm64/boot/dts/ti/k3-pinctrl.h | 82 ++++++++++++++---------------
 1 file changed, 41 insertions(+), 41 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/2 arm64: dts: ti: k3-pinctrl: consistently use tabs for alignment

Currently, there's a mix of spaces and tabs used for aligning the bodies of the macros, even within the same block. Use tabs throughout for consistency.

No functional change; 'git diff -w' produces no output.

---
 arch/arm64/boot/dts/ti/k3-pinctrl.h | 78 ++++++++++++++---------------
 1 file changed, 39 insertions(+), 39 deletions(-)
arch/arm64/boot/dts/ti/k3-pinctrl.h +39 -39
index dc8e03ae74c8..bdccb153e089 100644
@@ -8,15 +8,15 @@
 #ifndef DTS_ARM64_TI_K3_PINCTRL_H
 #define DTS_ARM64_TI_K3_PINCTRL_H
 
-#define WKUP_LVL_EN_SHIFT       (7)
-#define WKUP_LVL_POL_SHIFT      (8)
+#define WKUP_LVL_EN_SHIFT	(7)
+#define WKUP_LVL_POL_SHIFT	(8)
 #define ST_EN_SHIFT		(14)
 #define PULLUDEN_SHIFT		(16)
 #define PULLTYPESEL_SHIFT	(17)
 #define RXACTIVE_SHIFT		(18)
-#define DRV_STR_SHIFT           (19)
-#define ISO_OVERRIDE_EN_SHIFT   (22)
-#define ISO_BYPASS_EN_SHIFT     (23)
+#define DRV_STR_SHIFT		(19)
+#define ISO_OVERRIDE_EN_SHIFT	(22)
+#define ISO_BYPASS_EN_SHIFT	(23)
 #define DEBOUNCE_SHIFT		(11)
 #define FORCE_DS_EN_SHIFT	(15)
 #define DS_EN_SHIFT		(24)
@@ -24,7 +24,7 @@
 #define DS_OUT_VAL_SHIFT	(26)
 #define DS_PULLUD_EN_SHIFT	(27)
 #define DS_PULLTYPE_SEL_SHIFT	(28)
-#define WKUP_EN_SHIFT           (29)
+#define WKUP_EN_SHIFT		(29)
 
 /* Schmitt trigger configuration */
 #define ST_DISABLE		(0 << ST_EN_SHIFT)
@@ -39,28 +39,28 @@
 #define INPUT_EN		(1 << RXACTIVE_SHIFT)
 #define INPUT_DISABLE		(0 << RXACTIVE_SHIFT)
 
-#define DS_PULL_DISABLE         (1 << DS_PULLUD_EN_SHIFT)
-#define DS_PULL_ENABLE          (0 << DS_PULLUD_EN_SHIFT)
+#define DS_PULL_DISABLE		(1 << DS_PULLUD_EN_SHIFT)
+#define DS_PULL_ENABLE		(0 << DS_PULLUD_EN_SHIFT)
 
-#define DS_PULL_UP              (1 << DS_PULLTYPE_SEL_SHIFT | DS_PULL_ENABLE)
-#define DS_PULL_DOWN            (0 << DS_PULLTYPE_SEL_SHIFT | DS_PULL_ENABLE)
+#define DS_PULL_UP		(1 << DS_PULLTYPE_SEL_SHIFT | DS_PULL_ENABLE)
+#define DS_PULL_DOWN		(0 << DS_PULLTYPE_SEL_SHIFT | DS_PULL_ENABLE)
 
-#define DS_STATE_EN             (1 << DS_EN_SHIFT)
-#define DS_STATE_DISABLE        (0 << DS_EN_SHIFT)
+#define DS_STATE_EN		(1 << DS_EN_SHIFT)
+#define DS_STATE_DISABLE	(0 << DS_EN_SHIFT)
 
-#define DS_INPUT_EN             (1 << DS_OUT_DIS_SHIFT | DS_STATE_EN)
-#define DS_INPUT_DISABLE        (0 << DS_OUT_DIS_SHIFT | DS_STATE_EN)
+#define DS_INPUT_EN		(1 << DS_OUT_DIS_SHIFT | DS_STATE_EN)
+#define DS_INPUT_DISABLE	(0 << DS_OUT_DIS_SHIFT | DS_STATE_EN)
 
-#define DS_OUT_VALUE_ZERO       (0 << DS_OUT_VAL_SHIFT)
-#define DS_OUT_VALUE_ONE        (1 << DS_OUT_VAL_SHIFT)
+#define DS_OUT_VALUE_ZERO	(0 << DS_OUT_VAL_SHIFT)
+#define DS_OUT_VALUE_ONE	(1 << DS_OUT_VAL_SHIFT)
 
 /* Configuration to enable wake-up on pin activity */
-#define WKUP_ENABLE             (1 << WKUP_EN_SHIFT)
-#define WKUP_DISABLE            (0 << WKUP_EN_SHIFT)
-#define WKUP_ON_LEVEL           (1 << WKUP_LVL_EN_SHIFT)
-#define WKUP_ON_EDGE            (0 << WKUP_LVL_EN_SHIFT)
-#define WKUP_LEVEL_LOW          (0 << WKUP_LVL_POL_SHIFT)
-#define WKUP_LEVEL_HIGH         (1 << WKUP_LVL_POL_SHIFT)
+#define WKUP_ENABLE		(1 << WKUP_EN_SHIFT)
+#define WKUP_DISABLE		(0 << WKUP_EN_SHIFT)
+#define WKUP_ON_LEVEL		(1 << WKUP_LVL_EN_SHIFT)
+#define WKUP_ON_EDGE		(0 << WKUP_LVL_EN_SHIFT)
+#define WKUP_LEVEL_LOW		(0 << WKUP_LVL_POL_SHIFT)
+#define WKUP_LEVEL_HIGH		(1 << WKUP_LVL_POL_SHIFT)
 
 /* Only these macros are expected be used directly in device tree files */
 #define PIN_OUTPUT		(INPUT_DISABLE | PULL_DISABLE)
@@ -82,14 +82,14 @@
 #define PIN_DEBOUNCE_CONF5	(5 << DEBOUNCE_SHIFT)
 #define PIN_DEBOUNCE_CONF6	(6 << DEBOUNCE_SHIFT)
 
-#define PIN_DRIVE_STRENGTH_NOMINAL      (0 << DRV_STR_SHIFT)
-#define PIN_DRIVE_STRENGTH_SLOW         (1 << DRV_STR_SHIFT)
-#define PIN_DRIVE_STRENGTH_FAST         (2 << DRV_STR_SHIFT)
+#define PIN_DRIVE_STRENGTH_NOMINAL	(0 << DRV_STR_SHIFT)
+#define PIN_DRIVE_STRENGTH_SLOW		(1 << DRV_STR_SHIFT)
+#define PIN_DRIVE_STRENGTH_FAST		(2 << DRV_STR_SHIFT)
 
 #define PIN_DS_FORCE_DISABLE		(0 << FORCE_DS_EN_SHIFT)
 #define PIN_DS_FORCE_ENABLE		(1 << FORCE_DS_EN_SHIFT)
-#define PIN_DS_ISO_OVERRIDE_DISABLE     (0 << ISO_OVERRIDE_EN_SHIFT)
-#define PIN_DS_ISO_OVERRIDE_ENABLE      (1 << ISO_OVERRIDE_EN_SHIFT)
+#define PIN_DS_ISO_OVERRIDE_DISABLE	(0 << ISO_OVERRIDE_EN_SHIFT)
+#define PIN_DS_ISO_OVERRIDE_ENABLE	(1 << ISO_OVERRIDE_EN_SHIFT)
 #define PIN_DS_OUT_ENABLE		(0 << DS_OUT_DIS_SHIFT)
 #define PIN_DS_OUT_DISABLE		(1 << DS_OUT_DIS_SHIFT)
 #define PIN_DS_OUT_VALUE_ZERO		(0 << DS_OUT_VAL_SHIFT)
@@ -98,18 +98,18 @@
 #define PIN_DS_PULLUD_DISABLE		(1 << DS_PULLUD_EN_SHIFT)
 #define PIN_DS_PULL_DOWN		(0 << DS_PULLTYPE_SEL_SHIFT)
 #define PIN_DS_PULL_UP			(1 << DS_PULLTYPE_SEL_SHIFT)
-#define PIN_DS_ISO_BYPASS               (1 << ISO_BYPASS_EN_SHIFT)
-#define PIN_DS_ISO_BYPASS_DISABLE       (0 << ISO_BYPASS_EN_SHIFT)
-
-#define PIN_DS_OUTPUT_LOW               (DS_INPUT_DISABLE | DS_OUT_VALUE_ZERO)
-#define PIN_DS_OUTPUT_HIGH              (DS_INPUT_DISABLE | DS_OUT_VALUE_ONE)
-#define PIN_DS_INPUT                    (DS_INPUT_EN | DS_PULL_DISABLE)
-#define PIN_DS_INPUT_PULLUP             (DS_INPUT_EN | DS_PULL_UP)
-#define PIN_DS_INPUT_PULLDOWN           (DS_INPUT_EN | DS_PULL_DOWN)
-
-#define PIN_WKUP_EN_LEVEL_LOW           (WKUP_ENABLE | WKUP_ON_LEVEL | WKUP_LEVEL_LOW)
-#define PIN_WKUP_EN_LEVEL_HIGH          (WKUP_ENABLE | WKUP_ON_LEVEL | WKUP_LEVEL_HIGH)
-#define PIN_WKUP_EN                     (WKUP_ENABLE | WKUP_ON_EDGE)
+#define PIN_DS_ISO_BYPASS		(1 << ISO_BYPASS_EN_SHIFT)
+#define PIN_DS_ISO_BYPASS_DISABLE	(0 << ISO_BYPASS_EN_SHIFT)
+
+#define PIN_DS_OUTPUT_LOW		(DS_INPUT_DISABLE | DS_OUT_VALUE_ZERO)
+#define PIN_DS_OUTPUT_HIGH		(DS_INPUT_DISABLE | DS_OUT_VALUE_ONE)
+#define PIN_DS_INPUT			(DS_INPUT_EN | DS_PULL_DISABLE)
+#define PIN_DS_INPUT_PULLUP		(DS_INPUT_EN | DS_PULL_UP)
+#define PIN_DS_INPUT_PULLDOWN		(DS_INPUT_EN | DS_PULL_DOWN)
+
+#define PIN_WKUP_EN_LEVEL_LOW		(WKUP_ENABLE | WKUP_ON_LEVEL | WKUP_LEVEL_LOW)
+#define PIN_WKUP_EN_LEVEL_HIGH		(WKUP_ENABLE | WKUP_ON_LEVEL | WKUP_LEVEL_HIGH)
+#define PIN_WKUP_EN			(WKUP_ENABLE | WKUP_ON_EDGE)
 
 /* Default mux configuration for gpio-ranges to use with pinctrl */
 #define PIN_GPIO_RANGE_IOPAD	(PIN_INPUT | 7)
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/2 arm64: dts: ti: k3-pinctrl: sort shift values numerically

In reply to Rasmus Villemoes

The macros are easier to read when the values are sorted numerically.

---
 arch/arm64/boot/dts/ti/k3-pinctrl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-pinctrl.h +2 -2
index bdccb153e089..4491898d8294 100644
@@ -10,15 +10,15 @@
 
 #define WKUP_LVL_EN_SHIFT	(7)
 #define WKUP_LVL_POL_SHIFT	(8)
+#define DEBOUNCE_SHIFT		(11)
 #define ST_EN_SHIFT		(14)
+#define FORCE_DS_EN_SHIFT	(15)
 #define PULLUDEN_SHIFT		(16)
 #define PULLTYPESEL_SHIFT	(17)
 #define RXACTIVE_SHIFT		(18)
 #define DRV_STR_SHIFT		(19)
 #define ISO_OVERRIDE_EN_SHIFT	(22)
 #define ISO_BYPASS_EN_SHIFT	(23)
-#define DEBOUNCE_SHIFT		(11)
-#define FORCE_DS_EN_SHIFT	(15)
 #define DS_EN_SHIFT		(24)
 #define DS_OUT_DIS_SHIFT	(25)
 #define DS_OUT_VAL_SHIFT	(26)
Signature · 1 line
2.53.0
maintainer Applied
#3 lore raw
In reply to Rasmus Villemoes

Hi Rasmus Villemoes,

Quoted 9 lines · Rasmus Villemoes

arm64: dts: ti: k3-pinctrl: some minor cleanup

I stumbled on a few things one might want to clean up. No functional change.

Rasmus Villemoes (2):
arm64: dts: ti: k3-pinctrl: consistently use tabs for alignment
arm64: dts: ti: k3-pinctrl: sort shift values numerically

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/2] arm64: dts: ti: k3-pinctrl: consistently use tabs for alignment

      commit: 8bd215d1e4f27a8feb762b19a8d030178cf0337d
[2/2] arm64: dts: ti: k3-pinctrl: sort shift values numerically
      commit: 06498fabf2965233440072d70146798e4372a8fc

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh