From: Caleb Connolly Date: Mon, 24 Jun 2024 02:23:29 +0000 (+0200) Subject: spmi: msm: correct max_channels for v5 controllers X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=69b37f1625ac0c9d0c867d591564af91c0b52d18;p=u-boot.git spmi: msm: correct max_channels for v5 controllers 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 Signed-off-by: Caleb Connolly --- diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c index a35cb0ba01..5cc5a9e654 100644 --- a/drivers/spmi/spmi-msm.c +++ b/drivers/spmi/spmi-msm.c @@ -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 */