Skip to contentSkip to conversation

board: gateworks: venice: add GW7903 PMIC

PATCH Superseded Tim Harvey 2 participants 2 messages May 27, 2022 – May 30, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH v2 1/1 board: gateworks: venice: add GW7903 PMIC

The GW7903 has a BD71847 PMIC on I2C1. Adjust the model compare strings to add it.

---
v2: fixed typo in commit log and added Fabio's rb tag

---
 board/gateworks/venice/spl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
board/gateworks/venice/spl.c +5 -4
index 7e3e91e1d9cc..ae460296cb99 100644
@@ -175,11 +175,12 @@ static int power_init_board(void)
 	}
 
 	else if ((!strncmp(model, "GW7901", 6)) ||
-		 (!strncmp(model, "GW7902", 6))) {
-		if (!strncmp(model, "GW7901", 6))
-			ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus);
-		else
+		 (!strncmp(model, "GW7902", 6)) ||
+		 (!strncmp(model, "GW7903", 6))) {
+		if (!strncmp(model, "GW7902", 6))
 			ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus);
+		else
+			ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus);
 		if (ret) {
 			printf("PMIC    : failed I2C2 probe: %d\n", ret);
 			return ret;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Tim Harvey

The GW7903 has a BD71847 PMIC on I2C1. Adjust the model compare strings to add it.

Best Regards,
Jaehoon Chung

Quoted 27 lines

---
v2: fixed typo in commit log and added Fabio's rb tag

---
 board/gateworks/venice/spl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
board/gateworks/venice/spl.c +5 -4
index 7e3e91e1d9cc..ae460296cb99 100644
@@ -175,11 +175,12 @@ static int power_init_board(void)
 	}
 
 	else if ((!strncmp(model, "GW7901", 6)) ||
-		 (!strncmp(model, "GW7902", 6))) {
-		if (!strncmp(model, "GW7901", 6))
-			ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus);
-		else
+		 (!strncmp(model, "GW7902", 6)) ||
+		 (!strncmp(model, "GW7903", 6))) {
+		if (!strncmp(model, "GW7902", 6))
 			ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus);
+		else
+			ret = uclass_get_device_by_seq(UCLASS_I2C, 1, &bus);
 		if (ret) {
 			printf("PMIC    : failed I2C2 probe: %d\n", ret);
 			return ret;