From patchwork Fri Apr 17 14:50:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6234381 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E35CEBF4A6 for ; Fri, 17 Apr 2015 14:51:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 255E82038D for ; Fri, 17 Apr 2015 14:51:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC7AA20382 for ; Fri, 17 Apr 2015 14:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934883AbbDQOvH (ORCPT ); Fri, 17 Apr 2015 10:51:07 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:33391 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934882AbbDQOvD (ORCPT ); Fri, 17 Apr 2015 10:51:03 -0400 Received: by wgin8 with SMTP id n8so115579163wgi.0 for ; Fri, 17 Apr 2015 07:50:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b+MZ4hpSudn5iXkk8JZUeiaRqp60aDydHw3g+zJoD7E=; b=L1zMim8BentcKR192smIAHlVgAw/B17fEhB3kaSa181gaFCT9fiSd4PVeRnX+7SsAZ 4oXSwvFVsQx2dGk1skSv2gX5YQhp9H+2+se+wmgtF2eXKrxVHA1y57z8piiPziTJaF30 KXHRGxVAaZ8bhROlOtFGf1uA7MQk9mSjQ7kekE2eFkdPM31UthZfhLOhlmvBb8c+C3jr /iuux9XHV5VxNkUy8bJYE9Q5hJr3YrnpT+DK8gD4MNnqsSh9YXHSvPiQ31pzGJNEhPUo //vpopHY+t2isl0f+gfiRxx/vQbCde7cUlF5r/OPQBsGuxM26gwsf3CGMRk4Tu2P7tgK hhlw== X-Gm-Message-State: ALoCoQm2BWIqucgaB/hiHSBLwp2bNNmrlxWLtx1q94HXxe823/bOHdPNbr40FeKi0LR5isN9RFmv X-Received: by 10.194.59.4 with SMTP id v4mr6969937wjq.54.1429282259286; Fri, 17 Apr 2015 07:50:59 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id m1sm2980798wiw.7.2015.04.17.07.50.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Apr 2015 07:50:58 -0700 (PDT) From: "Ivan T. Ivanov" To: Linus Walleij , Bjorn Andersson Cc: Soren Brinkmann , Arnd Bergmann , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] pinctrl: qcom-spmi: Fix pin direction configuration Date: Fri, 17 Apr 2015 17:50:49 +0300 Message-Id: <1429282249-30450-1-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Pin direction configuration was incorrectly overwritten by output and function values in set_mux(). Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 1 + 2 files changed, 2 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index e8b74c6..ae4115e 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -260,6 +260,7 @@ static int pmic_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned function, val = 1; } + val = val << PMIC_GPIO_REG_MODE_DIR_SHIFT; val |= pad->function << PMIC_GPIO_REG_MODE_FUNCTION_SHIFT; val |= pad->out_value & PMIC_GPIO_REG_MODE_VALUE_SHIFT; diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index 8f6c7be..211b942 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c @@ -370,6 +370,7 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function, } } + val = val << PMIC_MPP_REG_MODE_DIR_SHIFT; val |= pad->function << PMIC_MPP_REG_MODE_FUNCTION_SHIFT; val |= pad->out_value & PMIC_MPP_REG_MODE_VALUE_MASK;