diff mbox series

drivers: spmi-msm: fix scanning for peripherals

Message ID 1512231882-5284-1-git-send-email-jorge.ramirez-ortiz@linaro.org
State Accepted
Commit bd3006c8494bedb11814e593ba1a64f3e4935030
Headers show
Series drivers: spmi-msm: fix scanning for peripherals | expand

Commit Message

Jorge Ramirez-Ortiz Dec. 2, 2017, 4:24 p.m. UTC
A typo in the probe function causes not all peripherals to be scanned
(in the case of the Dragonboard820c - work in progress - it wont find pmic0).
---
 drivers/spmi/spmi-msm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Dec. 13, 2017, 10:56 p.m. UTC | #1
On Sat, Dec 02, 2017 at 05:24:42PM +0100, Jorge Ramirez-Ortiz wrote:

> A typo in the probe function causes not all peripherals to be scanned

> (in the case of the Dragonboard820c - work in progress - it wont find pmic0).


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index ca27ee5..c226913 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -161,7 +161,7 @@  static int msm_spmi_probe(struct udevice *dev)
 		return -EINVAL;
 
 	/* Scan peripherals connected to each SPMI channel */
-	for (i = 0; i < SPMI_MAX_CHANNELS ; i++) {
+	for (i = 0; i < SPMI_MAX_PERIPH ; i++) {
 		uint32_t periph = readl(priv->arb_chnl + ARB_CHANNEL_OFFSET(i));
 		uint8_t slave_id = (periph & 0xf0000) >> 16;
 		uint8_t pid = (periph & 0xff00) >> 8;