From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3350886252; Tue, 14 May 2024 11:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715687190; cv=none; b=DLxO6DI1iniAZrfIprinL+Qa6uGR6KV+77HJq2crmF/uimYfhXy+V5T68zi3E6JJ8LMjRDbKKPEr24m1xtYUZGE+//mCA6Wu20EI4cYdg0lwSUTw93vAwVWXUVSwmCV61sTUfIGbkYKv01HJtWQeTcKJAPh67/QmYJvcXM73M9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715687190; c=relaxed/simple; bh=Dx+1DV0CT8e99wqEfV7BphLYUpmYWOnUcS/VXjueaQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rrk07xAJLnicFjIYcI/1Ce8FO6B/e0jo+CuxWEWwr0gaE4hMg8flym+iHpS5geyNGF/n8Q1yygBWBgbnPwRTfvgX9tas3V1wrygsGXZEE+XJf0oyEdme19hRRWzCxlTMqGXc7LCMzJSPwdrPnDjfs8wBxJxty1Gl1GnjDWFP+Bw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UyGpAjZT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UyGpAjZT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE516C32781; Tue, 14 May 2024 11:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715687190; bh=Dx+1DV0CT8e99wqEfV7BphLYUpmYWOnUcS/VXjueaQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UyGpAjZTz2NR5Lmib90kAYl7MZq5ejafBQg0Ck0HYlp5QlI56AXcQ6zjU+Oq44D5d 7G3uwbG8xdzEcf/a0nCsFS8OI7jEC45wkmWI30WWEcF+ufnYSPBBinzPdRu856gqUN hGppO61vhJeOAjfPloGQSicoo5xiPhSaOzT0q2lU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chen-Yu Tsai , AngeloGioacchino Del Regno , Linus Walleij , Sasha Levin Subject: [PATCH 5.10 011/111] pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback Date: Tue, 14 May 2024 12:19:09 +0200 Message-ID: <20240514100957.553007103@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514100957.114746054@linuxfoundation.org> References: <20240514100957.114746054@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chen-Yu Tsai [ Upstream commit 08f66a8edd08f6f7cfa769c81634b29a2b123908 ] In the generic pin config library, readback of some options are handled differently compared to the setting of those options: the argument value is used to convey enable/disable of an option in the set path, but success or -EINVAL is used to convey if an option is enabled or disabled in the debugfs readback path. PIN_CONFIG_INPUT_SCHMITT_ENABLE is one such option. Fix the readback of the option in the mediatek-paris library, so that the debugfs dump is not showing "input schmitt enabled" for pins that don't have it enabled. Fixes: 1bea6afbc842 ("pinctrl: mediatek: Refine mtk_pinconf_get()") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Message-ID: <20240327091336.3434141-2-wenst@chromium.org> Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mediatek/pinctrl-paris.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index b9afb9595733b..95a71606c2865 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -141,6 +141,8 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev, } err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SMT, &ret); + if (!ret) + err = -EINVAL; break; case PIN_CONFIG_DRIVE_STRENGTH: if (!hw->soc->drive_get) -- 2.43.0