Skip to contentSkip to conversation

i2c: Incremental fixes for Mellanox BlueField I2C

PATCH Superseded Khalil Blaiech 2 participants 4 messages Nov 6, 2020 – Nov 9, 2020

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover i2c: Incremental fixes for Mellanox BlueField I2C

This set of fixes tends to complement the upstream effort of the driver code and aims to address the following issues:
- Convert the DT file to a YAML schema to be consistent with the latest kernel releases.
- Fix build issues reproted by the kernel test robot.
- Apply a couple of changes to the driver code to include bug fixes.
- Keep the MAINTAINER info up-to-date.
---
v2->v3:
- Address dtschema/dt warning/errors by removing 'additionalProperties: false' line.
v1->v2:
- Address yamllint and dtschema/dt warning/errors.
- Dual license the YAML schema by adding BSD-2-Clause.
---

Khalil Blaiech (6):
i2c: mlxbf: Add CONFIG_ACPI to guard ACPI function call
i2c: mlxbf: Fix resrticted cast warning of sparse
i2c: mlxbf: Remove unecessary wrapper functions
i2c: mlxbf: Update reference clock frequency
i2c: mlxbf: Update author and maintainer email info
dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema

 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt |  42 -----
 .../bindings/i2c/mellanox,i2c-mlxbf.yaml           |  78 ++++++++
 MAINTAINERS                                        |   3 +-
 drivers/i2c/busses/i2c-mlxbf.c                     | 204 +++++++++------------
 4 files changed, 166 insertions(+), 161 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
Signature · 1 line
2.1.2
#1 lore raw

PATCH v3 6/6 dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema

Write the devicetree binding text file associated with the Mellanox BlueField I2C controller in schema file, JSON compatible subset of YAML. Besides, add an entry within MAINTAINERS file.

---
 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt | 42 ------------
 .../bindings/i2c/mellanox,i2c-mlxbf.yaml           | 78 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 3 files changed, 79 insertions(+), 42 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt deleted +0 -42
deleted file mode 100644
index 566ea86..0000000
@@ -1,42 +0,0 @@
-Device tree configuration for the Mellanox I2C SMBus on BlueField SoCs
-
-Required Properties:
-
-- compatible : should be "mellanox,i2c-mlxbf1" or "mellanox,i2c-mlxbf2".
-
-- reg : address offset and length of the device registers. The
-	registers consist of the following set of resources:
-		1) Smbus block registers.
-		2) Cause master registers.
-		3) Cause slave registers.
-		4) Cause coalesce registers (if compatible isn't set
-		   to "mellanox,i2c-mlxbf1").
-
-- interrupts : interrupt number.
-
-Optional Properties:
-
-- clock-frequency : bus frequency used to configure timing registers;
-			allowed values are 100000, 400000 and 1000000;
-			those are expressed in Hz. Default is 100000.
-
-Example:
-
-i2c@2804000 {
-	compatible = "mellanox,i2c-mlxbf1";
-	reg =	<0x02804000 0x800>,
-		<0x02801200 0x020>,
-		<0x02801260 0x020>;
-	interrupts = <57>;
-	clock-frequency = <100000>;
-};
-
-i2c@2808800 {
-	compatible = "mellanox,i2c-mlxbf2";
-	reg =	<0x02808800 0x600>,
-	        <0x02808e00 0x020>,
-		<0x02808e20 0x020>,
-		<0x02808e40 0x010>;
-	interrupts = <57>;
-	clock-frequency = <400000>;
-};
Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml new file +78 -0

78 lines not on this page · raw message

MAINTAINERS +1 -0
index 54de08f..7dd2725 100644
@@ -11166,6 +11166,7 @@ MELLANOX BLUEFIELD I2C DRIVER
 M:	Khalil Blaiech <[email protected]>
 L:	[email protected]
 S:	Supported
+F:	Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
 F:	drivers/i2c/busses/i2c-mlxbf.c
 
 MELLANOX ETHERNET DRIVER (mlx4_en)
Signature · 1 line
2.1.2
maintainer Reviewed-by on v3 6/6
#2 lore raw

Re: [PATCH i2c-next v3 6/6] dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema

Quoted 5 lines · Khalil Blaiech

Write the devicetree binding text file associated with the Mellanox BlueField I2C controller in schema file, JSON compatible subset of YAML. Besides, add an entry within MAINTAINERS file.

Quoted 9 lines
---
 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt | 42 ------------
 .../bindings/i2c/mellanox,i2c-mlxbf.yaml           | 78 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 3 files changed, 79 insertions(+), 42 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
#3 lore raw

RE: [PATCH i2c-next v3 6/6] dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema

Quoted 17 lines · Khalil Blaiech
Quoted 9 lines

Write the devicetree binding text file associated with the Mellanox BlueField I2C controller in schema file, JSON compatible subset of YAML. Besides, add an entry within MAINTAINERS file.

---
 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt | 42 ------------
 .../bindings/i2c/mellanox,i2c-mlxbf.yaml           | 78

++++++++++++++++++++++

Quoted 3 lines
 MAINTAINERS                                        |  1 +
 3 files changed, 79 insertions(+), 42 deletions(-)
 delete mode 100644
Quoted 6 lines

Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt

Quoted 1 line
 create mode 100644

Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml

Quoted 1 line

Rob, thank you for having taken the time to review the changes.