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: 47291 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B50D120553 for ; Fri, 17 Apr 2015 14:51:13 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf24494764wgi.3 for ; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=anOLjdAK1yVg/rQ9z0qRjc3h6wpq1BujKYK4xay4nb4=; b=nASBAAP8W4aqEmr7tkjoJ6Mj7Ia9V8U/FdIdsOMm6ipGruS+9ZgSFePC+uJjz/QmQD ad9+3NH+BydtDzEK+9XfeWdNHgcBqPpPLVYKmx0b1M+X0W2EDGoUzDwQ10y70sC8MhAo 4uegmqxK3rWwNCmqZac4N6K8V8emZ62ZGJV4IboelycGEMrfUm3hHZIfpxI0NeIKkSha bHJH2BicfkU1keryks63GmX8iFkPcVmBBhbF+i9ujP+oqGD1rY69t9+hw0YE05UxBjgZ uqtMtx4a5gBz9cuhvYi6zWroTmerjew6lNQZY5+7dm3WmVRpoUSxXcq898xuLhlnshBi es6Q== X-Gm-Message-State: ALoCoQnq/TlXjsx4XIUJah/vZR3+UBtaXclRcmY5aDjU1CPKWNLJs/QrZPQ1xCdhv4OFezilKsQU X-Received: by 10.112.118.162 with SMTP id kn2mr1691198lbb.22.1429282272901; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.8.171 with SMTP id dl11ls511527lad.55.gmail; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) X-Received: by 10.152.22.1 with SMTP id z1mr4310566lae.114.1429282272623; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id kx6si8926059lac.141.2015.04.17.07.51.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 07:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by layy10 with SMTP id y10so82224086lay.0 for ; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) X-Received: by 10.152.19.199 with SMTP id h7mr4465035lae.32.1429282272462; Fri, 17 Apr 2015 07:51:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp30452lbt; Fri, 17 Apr 2015 07:51:11 -0700 (PDT) X-Received: by 10.70.53.40 with SMTP id y8mr6162168pdo.61.1429282270797; Fri, 17 Apr 2015 07:51:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ss1si17001048pab.220.2015.04.17.07.51.10; Fri, 17 Apr 2015 07:51:10 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934884AbbDQOvF (ORCPT + 1 other); Fri, 17 Apr 2015 10:51:05 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:36762 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934883AbbDQOvD (ORCPT ); Fri, 17 Apr 2015 10:51:03 -0400 Received: by wgsk9 with SMTP id k9so115568110wgs.3 for ; Fri, 17 Apr 2015 07:50:59 -0700 (PDT) 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-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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-gpio" 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;