Re: [PATCH net-next v8 4/9] dt-bindings: net: convert hisi-femac.txt to YAML

From: Yang Xiwen
Date: Thu Mar 07 2024 - 05:34:30 EST


On 3/7/2024 3:48 PM, Krzysztof Kozlowski wrote:
On 06/03/2024 10:28, Yang Xiwen wrote:
On 3/6/2024 3:39 PM, Krzysztof Kozlowski wrote:
On 05/03/2024 08:51, Yang Xiwen via B4 Relay wrote:
From: Yang Xiwen <forbidden405@xxxxxxxxxxx>

Convert the old text binding to new YAML.

While at it, make some changes to the binding:
- The version numbers are not documented publicly. The version also does
not change programming interface. Remove it until it's really needed.
- A few clocks are missing in old binding file. Add them to match the real
hardware.

Signed-off-by: Yang Xiwen <forbidden405@xxxxxxxxxxx>
---
.../bindings/net/hisilicon,hisi-femac.yaml | 89 ++++++++++++++++++++++
.../devicetree/bindings/net/hisilicon-femac.txt | 41 ----------
2 files changed, 89 insertions(+), 41 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml
new file mode 100644
index 000000000000..ba207f2c9ae4
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/hisilicon,hisi-femac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Fast Ethernet MAC controller
+
+maintainers:
+ - Yang Xiwen <forbidden405@xxxxxxxxxxx>
+
+allOf:
+ - $ref: ethernet-controller.yaml
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - hisilicon,hi3516cv300-femac
+ - const: hisilicon,hisi-femac
Drop this fallback, your later driver change does not use it, so neither
should have binding. Explain in commit msg, that old binding was
incorrect (we discussed it a lot) thus you are making such change during
conversion.

What about deprecating "hisilicon,hisi-femac-vn" compatibles and
introduce a new generic compatible "hisilicon,hisi-femac" instead? This
way, We can keep backward compatibility.
What backward compatibility? Didn't you say bindings and driver are
broken and you are going to break ABI to fix them up?


Yes, indeed the old binding is broken. I'm just wondering why you say "hisilicon,hisi-femac" should be removed. The FEMAC core on both SoCs are compatible afaik.



Best regards,
Krzysztof


--
Regards,
Yang Xiwen