]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spmi: msm: correct max_channels for v5 controllers
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 24 Jun 2024 02:23:29 +0000 (04:23 +0200)
committerCaleb Connolly <caleb.connolly@linaro.org>
Fri, 5 Jul 2024 10:07:37 +0000 (12:07 +0200)
Commit ee1d8aa5ecf7 ("spmi: msm: support controller version 7") broke
support for channels > 128 on v5 controllers, resulting in some
peripherals (like the power button / pon) working but others (like
gpios) reading bogus data.

Correct max_channels for v5 controllers.

Fixes: ee1d8aa5ecf7 ("spmi: msm: support controller version 7")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
drivers/spmi/spmi-msm.c

index a35cb0ba01e403c57c65caf2e4644ff6a6c2dcda..5cc5a9e654c8371d71386384654e9429ed96b05f 100644 (file)
@@ -271,7 +271,7 @@ static int msm_spmi_probe(struct udevice *dev)
        } else if (hw_ver < PMIC_ARB_VERSION_V7_MIN) {
                priv->arb_ver = V5;
                priv->arb_chnl = core_addr + APID_MAP_OFFSET_V5;
-               priv->max_channels = SPMI_MAX_CHANNELS;
+               priv->max_channels = SPMI_MAX_CHANNELS_V5;
                priv->spmi_cnfg = dev_read_addr_name(dev, "cnfg");
        } else {
                /* TOFIX: handle second bus */