Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e637ac2 authored by Ivan T. Ivanov's avatar Ivan T. Ivanov Committed by Linus Walleij
Browse files

pinctrl: qcom-spmi-mpp: Fix input value report



Fix interpretation of the pmic_mpp_read() return code,
negative value means an error.

Signed-off-by: default avatarIvan T. Ivanov <ivan.ivanov@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent dc391502
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -577,11 +577,12 @@ static void pmic_mpp_config_dbg_show(struct pinctrl_dev *pctldev,

		if (pad->input_enabled) {
			ret = pmic_mpp_read(state, pad, PMIC_MPP_REG_RT_STS);
			if (!ret) {
			if (ret < 0)
				return;

			ret &= PMIC_MPP_REG_RT_STS_VAL_MASK;
			pad->out_value = ret;
		}
		}

		seq_printf(s, " %-4s", pad->output_enabled ? "out" : "in");
		seq_printf(s, " %-4s", pad->analog_mode ? "ana" : "dig");