Commit b56ca501 authored by Stephen Boyd's avatar Stephen Boyd Committed by Greg Kroah-Hartman

spmi: pmic-arb: Add sid and address to error messages

It's useful to know what particular device/component is having trouble
accessing the bus. Add the sid and address to error messages here so
that debugging is a little simpler.

Link: https://lore.kernel.org/r/20210920234849.3614036-1-swboyd@chromium.org
Cc: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Cc: satya priya <skakit@codeaurora.org>
Reviewed-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Reviewed-by: default avatarSatya Priya <skakit@codeaurora.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20211216190812.1574801-2-sboyd@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1dba0075
......@@ -261,20 +261,21 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
if (status & PMIC_ARB_STATUS_DONE) {
if (status & PMIC_ARB_STATUS_DENIED) {
dev_err(&ctrl->dev, "%s: transaction denied (0x%x)\n",
__func__, status);
dev_err(&ctrl->dev, "%s: %#x %#x: transaction denied (%#x)\n",
__func__, sid, addr, status);
return -EPERM;
}
if (status & PMIC_ARB_STATUS_FAILURE) {
dev_err(&ctrl->dev, "%s: transaction failed (0x%x)\n",
__func__, status);
dev_err(&ctrl->dev, "%s: %#x %#x: transaction failed (%#x)\n",
__func__, sid, addr, status);
WARN_ON(1);
return -EIO;
}
if (status & PMIC_ARB_STATUS_DROPPED) {
dev_err(&ctrl->dev, "%s: transaction dropped (0x%x)\n",
__func__, status);
dev_err(&ctrl->dev, "%s: %#x %#x: transaction dropped (%#x)\n",
__func__, sid, addr, status);
return -EIO;
}
......@@ -283,8 +284,8 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
udelay(1);
}
dev_err(&ctrl->dev, "%s: timeout, status 0x%x\n",
__func__, status);
dev_err(&ctrl->dev, "%s: %#x %#x: timeout, status %#x\n",
__func__, sid, addr, status);
return -ETIMEDOUT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment