Skip to contentSkip to conversation

i2c: Bugfix in i2c_get_chip_by_phandle()

PATCH In review Philip Oberfichtner 3 participants 4 messages Nov 24, 2023 – Nov 27, 2023 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: Bugfix in i2c_get_chip_by_phandle()

The "i2cbcdev" sneaked in when implementing this function for the bootcounter use case. Obviously the intention was to use prop_name instead.

Fixes b483552773 (i2c: Implement i2c_get_chip_by_phandle())
---
 drivers/i2c/i2c-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/i2c-uclass.c +1 -1
index d0db25dcc0..3cbd4a81a5 100644
@@ -428,7 +428,7 @@ int i2c_get_chip_by_phandle(const struct udevice *parent, const char *prop_name,
 		goto err_exit;
 	}
 
-	ret = dev_read_u32(parent, "i2cbcdev", &phandle);
+	ret = dev_read_u32(parent, prop_name, &phandle);
 	if (ret)
 		goto err_exit;
 
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw

Hello Philip,

Quoted 10 lines · Philip Oberfichtner

The "i2cbcdev" sneaked in when implementing this function for the bootcounter use case. Obviously the intention was to use prop_name instead.

Fixes b483552773 (i2c: Implement i2c_get_chip_by_phandle())
---
 drivers/i2c/i2c-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Indeed!

@Tom: Do you want a pull request from me, or can you pick up this?

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: [email protected]
#2 lore raw
Quoted 14 lines · Heiko Schocher

Hello Philip,

Quoted 10 lines · Philip Oberfichtner

The "i2cbcdev" sneaked in when implementing this function for the bootcounter use case. Obviously the intention was to use prop_name instead.

Fixes b483552773 (i2c: Implement i2c_get_chip_by_phandle())
---
 drivers/i2c/i2c-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

Indeed!

@Tom: Do you want a pull request from me, or can you pick up this?

I can get just this, thanks.

Signature · 1 line
Tom
#3 lore raw
In reply to Philip Oberfichtner
Quoted 8 lines · Philip Oberfichtner

The "i2cbcdev" sneaked in when implementing this function for the bootcounter use case. Obviously the intention was to use prop_name instead.

Fixes b483552773 (i2c: Implement i2c_get_chip_by_phandle())

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom