Skip to contentSkip to conversation

i2c: nx: Use dev_read_addr_ptr()

PATCH In review [email protected] 2 participants 6 messages May 25 – Jul 9 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 i2c: nx: Use dev_read_addr_ptr()

From: Peng Fan <[email protected]>

Use dev_read_addr_ptr() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

---
 drivers/i2c/nx_i2c.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/i2c/nx_i2c.c +4 -3
index 706b7adefe8..ab3f1cc30cf 100644
@@ -230,12 +230,13 @@ static void i2c_process_node(struct udevice *dev)
 static int nx_i2c_probe(struct udevice *dev)
 {
 	struct nx_i2c_bus *bus = dev_get_priv(dev);
-	fdt_addr_t addr;
+	void __iomem *addr;
 
 	/* get regs = i2c base address */
-	addr = devfdt_get_addr(dev);
-	if (addr == FDT_ADDR_T_NONE)
+	addr = dev_read_addr_ptr(dev);
+	if (!addr)
 		return -EINVAL;
+
 	bus->regs = (struct nx_i2c_regs *)addr;
 
 	bus->bus_num = dev_seq(dev);
Signature · 1 line
2.51.0
#1 lore raw

PATCH 2/2 i2c: nx: Add License

From: Peng Fan <[email protected]>

Add License information for nx_i2c driver.

---
 drivers/i2c/nx_i2c.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/nx_i2c.c +2 -0
index ab3f1cc30cf..5800e79ab70 100644
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0+
+
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
Signature · 1 line
2.51.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] i2c: nx: Add License

Hello Peng,

Quoted 8 lines · On 25.05.26 06:03, [email protected] wrote:

From: Peng Fan <[email protected]>

Add License information for nx_i2c driver.

---
  drivers/i2c/nx_i2c.c | 2 ++
  1 file changed, 2 insertions(+)

bye,
Heiko

Signature · 5 lines
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic
#3 lore raw

Re: [PATCH 2/2] i2c: nx: Add License

Hello Peng,

Quoted 5 lines · Heiko Schocher

Hello Peng,

Quoted 2 lines · On 25.05.26 06:03, [email protected] wrote:

From: Peng Fan <[email protected]>

Quoted 8 lines
Quoted 6 lines

Add License information for nx_i2c driver.

---
  drivers/i2c/nx_i2c.c | 2 ++

  1 file changed, 2 insertions(+)

Applied to u-boot-i2c.git

Thanks!

bye,
Heiko

Signature · 5 lines
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic
Reviewed-by on v1 1/2
#4 lore raw
In reply to [email protected]

Hello Peng,

Quoted 11 lines · On 25.05.26 06:03, [email protected] wrote:

From: Peng Fan <[email protected]>

Use dev_read_addr_ptr() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

---
  drivers/i2c/nx_i2c.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

bye,
Heiko

Signature · 5 lines
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic
#5 lore raw

Hello Peng,

Quoted 8 lines · Heiko Schocher

Hello Peng,

Quoted 5 lines · On 25.05.26 06:03, [email protected] wrote:

From: Peng Fan <[email protected]>

Use dev_read_addr_ptr() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers.

Quoted 8 lines
Quoted 6 lines

No functional changes.

---
  drivers/i2c/nx_i2c.c | 7 ++++---

  1 file changed, 4 insertions(+), 3 deletions(-)

Applied to u-boot-i2c.git

Thanks!

bye,
Heiko

Signature · 5 lines
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic