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 DD97B1CAA4; Tue, 14 May 2024 11:28: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=1715686111; cv=none; b=c/y/alJ70e3b8XbcvdM0JdRCy1xA8p2R2fSHg+I7/JeqldyP5drS4xFQnpGZhqSH7n6MpfUCBX7Sp7ccz/klalq39APhj8fkzYqZ2Cx/Mpk3CYuo5mQkW/wkj23ifS4HDWxCPOzdsGUgGUCnFg6iyR4KpqpY2c9sLHGcYxpCGcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715686111; c=relaxed/simple; bh=ij1Q0++qCc8jvqdJnt0qD+xt0rdLnkh1thoz1T7zDOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UXrlsDgncgboGlAKLtWbsORPlGygX+sGg27LsDJL/jTCdkIwVy7aJXy+oqP8WspmsPCuZhdDVqwKYgdNPJiw7vA0xyIFweXuBwUzb0a+7uNrrfnRE4KUtjaQa17T/M2jzC6JF5o8swUQGAbzFdRkbdXD8x5hJ4+4AvOZLyDH8TQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bJmDRwmJ; 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="bJmDRwmJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 628DAC2BD10; Tue, 14 May 2024 11:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715686110; bh=ij1Q0++qCc8jvqdJnt0qD+xt0rdLnkh1thoz1T7zDOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bJmDRwmJz07e0ZcO73mUtDGn+FU6YRS9QVPBPNv/rRqtgwyvN3jOmnMEv9C/rz9Zz 9Lj/l7gj2I1haopJw188tfI8E1K8ibQqhAClTrqEjcOO2raxjwuS9JxlOzMlia96o4 +KC5dUoWVNJftN2nn9wOV/Qd5DJ316OYigub3Z44= 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 6.1 025/236] pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback Date: Tue, 14 May 2024 12:16:27 +0200 Message-ID: <20240514101021.289280845@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101020.320785513@linuxfoundation.org> References: <20240514101020.320785513@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 6.1-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 ad873bd051b68..3f2297ee2b765 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -188,6 +188,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