From patchwork Tue Oct 27 13:50:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BC79C55179 for ; Tue, 27 Oct 2020 15:01:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13A9A22264 for ; Tue, 27 Oct 2020 15:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810864; bh=wtsYNTNiMBabdnx6uyZcAbsHDJZMl69FfYIawJAhTCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qiYgzf+xvujCLJKF61fWQWxhJljv0ZgydOq6H967b6gzOTX7CyvlSF6upEy4xz/nA iZ17cB8sXbE5tyGkcbqhOfoX3EbW53nqgqIkhGIqtJyDjlRv5dM5hr/mrL2IS9Gjs2 2YxlmUUc+lHpgFgVfX+hLnFXJCS5YkfBofv3Wa8A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1775120AbgJ0PBA (ORCPT ); Tue, 27 Oct 2020 11:01:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766984AbgJ0PA5 (ORCPT ); Tue, 27 Oct 2020 11:00:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB88622264; Tue, 27 Oct 2020 15:00:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810857; bh=wtsYNTNiMBabdnx6uyZcAbsHDJZMl69FfYIawJAhTCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e3dy+eD8/rsOBLLNLlDg5AskTkabjaesW2o9N3qJtxRbAIUEliw1DvogKb52+2aQf wB/23JdWxDpotvz1qxUTOGP/YTshQ+EzYvUxqlaAsWFwSLk9+/7ygCEbaJFBXGGIMx wEmeVvbaJlFxDs0EEGkq437ow7nIwj7rqlHYwaHY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Jeffery , Joel Stanley , Johnny Huang , Linus Walleij , Sasha Levin Subject: [PATCH 5.8 288/633] pinctrl: aspeed: Use the right pinconf mask Date: Tue, 27 Oct 2020 14:50:31 +0100 Message-Id: <20201027135536.178220421@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrew Jeffery [ Upstream commit 1d6db5ae6b090d1a8edfcb36b9bf47c5f4fe27f6 ] The Aspeed pinconf data structures are split into 'conf' and 'map' types, where the 'conf' struct defines which register and bitfield to manipulate, while the 'map' struct defines what value to write to the register and bitfield. Both structs have a mask member, and the wrong mask was being used to tell the regmap which bits to update. A todo is to look at whether we can remove the mask from the 'map' struct. Fixes: 5f52c853847f ("pinctrl: aspeed: Use masks to describe pinconf bitfields") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Cc: Johnny Huang Link: https://lore.kernel.org/r/20200910025631.2996342-3-andrew@aj.id.au Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c index b625a657171e6..11e27136032b9 100644 --- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c @@ -515,7 +515,7 @@ int aspeed_pin_config_set(struct pinctrl_dev *pctldev, unsigned int offset, val = pmap->val << __ffs(pconf->mask); rc = regmap_update_bits(pdata->scu, pconf->reg, - pmap->mask, val); + pconf->mask, val); if (rc < 0) return rc;