Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Enable NFC

Krzysztof Kozlowski <[email protected]> Wed, 25 Mar 2026 12:31:57 +0100
Newsgroups dev.linux.lists.oe-linux-nfc,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.phone-devel
Message-ID <[email protected]>
On 25/03/2026 12:20, Konrad Dybcio wrote:
>>
>>>
>>> FWIW TLMM subnodes are best sorted by pin index (although the file
>>> currently doesn't really do that) as per dts coding style
>>
>> I assume when I group the -pins into -state it doesn't apply anymore? As I don't feel having pins relevant to one device / subsystem all over the place is extra clean.
> 

	nfc_int_default: nfc-int-default-state {
		pins = "gpio63";
	};

	nfc_enable_default: nfc-enable-default-state {
		pins = "gpio12", "gpio62";
	};

 	sde_dsi_active: sde-dsi-active-state {
 		pins = "gpio6", "gpio11";
	}

Let's imagine future possible implementation of DTS coding style
linter/checkpatch. How it would sort the nodes? Either by node name or
the first value in "pins", this this would be:

 	sde_dsi_active: sde-dsi-active-state {
 		pins = "gpio6", "gpio11";
	}

	nfc_enable_default: nfc-enable-default-state {
		pins = "gpio12", "gpio62";
	};

	nfc_int_default: nfc-int-default-state {
		pins = "gpio63";
	};

So that's how you code. Less work for future linter/checkpatch.

The trouble is that "pins" property sorting can result in nodes being
spread all over, imagine:

	nfc_enable_default: nfc-enable-default-state {
		pins = "gpio5", "gpio62";
			// ^^^^^ DIFFERENCE!
	};

 	sde_dsi_active: sde-dsi-active-state {
 		pins = "gpio6", "gpio11";
	}

	nfc_int_default: nfc-int-default-state {
		pins = "gpio63";
	};

That's why I would propose to keep everything sorted by node name, but I
am fine with both choices. Qualcomm maintainers decide about such
detailed style they want to impose.

Best regards,
Krzysztof