From patchwork Wed Apr 3 09:23:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 15847 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6A1B623E06 for ; Wed, 3 Apr 2013 09:24:05 +0000 (UTC) Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by fiordland.canonical.com (Postfix) with ESMTP id BB964A184FB for ; Wed, 3 Apr 2013 09:24:04 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gf12sf2050974vcb.8 for ; Wed, 03 Apr 2013 02:24:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=OdKrD9mY7psEbl/94EiVsqzDiI0xg7GS9Yt5IqG2EvY=; b=EsSEzl8BVCVI7ZaPMdpdGUfEN3GUU6AhkBcSFLf1q4UJQFB2wGNPvbXVTAB1lHOVTY 9G79s8DR/VUtymeqGuY0rbkEy1Z8Dr8F8YccmDaJfYqYhHuEZ0gsSZbdvodbAAEcrraZ 3o8ymNm5OVz53+2dd/Zyt+Va13SniXcgENGAS5e9jPSru9MJyI9yFvBhbEDA/bw+2D8D ruMV8sJJ0oHLakaJWGlYEjBhgbvkH8nC5xwJxRMlZlAI0UA0JYZEheHYG6qB9KL1+Jay 6Yr509Nbm+zo58RI55/EGR31LQ3MIgqXaO/QZGbQM9Qf4SzAeVVeyH185jDBqEWx7B6L ASkQ== X-Received: by 10.224.18.132 with SMTP id w4mr750079qaa.1.1364981044242; Wed, 03 Apr 2013 02:24:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.33 with SMTP id oj1ls887279qeb.89.gmail; Wed, 03 Apr 2013 02:24:04 -0700 (PDT) X-Received: by 10.221.9.136 with SMTP id ow8mr548189vcb.58.1364981043953; Wed, 03 Apr 2013 02:24:03 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id p10si4341039vcj.18.2013.04.03.02.24.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 02:24:03 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x13so277392vbb.6 for ; Wed, 03 Apr 2013 02:24:03 -0700 (PDT) X-Received: by 10.220.106.14 with SMTP id v14mr616821vco.2.1364981043710; Wed, 03 Apr 2013 02:24:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp161830ved; Wed, 3 Apr 2013 02:24:03 -0700 (PDT) X-Received: by 10.14.5.137 with SMTP id 9mr2022192eel.30.1364981042399; Wed, 03 Apr 2013 02:24:02 -0700 (PDT) Received: from eu1sys200aog118.obsmtp.com (eu1sys200aog118.obsmtp.com [207.126.144.145]) by mx.google.com with SMTP id i43si7681471eem.132.2013.04.03.02.23.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 02:24:02 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.145 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.145; Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKUVv1IMAZcDdVl8sfYUiHwb/e8YAjdG1l@postini.com; Wed, 03 Apr 2013 09:24:01 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6B369D9; Wed, 3 Apr 2013 09:15:33 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 7F5BC4FF; Wed, 3 Apr 2013 09:23:40 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 61BDFA8095; Wed, 3 Apr 2013 11:23:35 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.279.5; Wed, 3 Apr 2013 11:23:39 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Patrice Chotard , Linus Walleij Subject: [PATCH] pinctrl/abx500: fix ab8505 alternate function Date: Wed, 3 Apr 2013 11:23:34 +0200 Message-ID: <1364981014-423-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmQYjtgwsN7JMmJTAZsaF5KnwEGyC1/kCMT0BNsxyR8PNdeV/2CMYsCFqZgUKgky7mGJZ6z X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Patrice Chotard This fix allows to correctly select default and alternate pin mode. By default for all ABx500 family chip, pin default mode is selected by clearing corresponding bit in GPIOSELx register except for pins which support alternate function, in this case, corresponding bit must be set. But, due to an unlogical hardware implementation, for one particular pin (GPIO11) reverse setting must be done. For that, update the alternate function array by declaring that this pin supports alternate function. Reported-by: Ramesh Chandrasekaran Signed-off-by: Patrice Chotard Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-ab8505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-ab8505.c b/drivers/pinctrl/pinctrl-ab8505.c index 3a4238e..8ae076a 100644 --- a/drivers/pinctrl/pinctrl-ab8505.c +++ b/drivers/pinctrl/pinctrl-ab8505.c @@ -284,7 +284,7 @@ struct alternate_functions ab8505_alternate_functions[AB8505_GPIO_MAX_NUMBER + 1 ALTERNATE_FUNCTIONS(9, UNUSED, UNUSED, UNUSED, 0, 0, 0), /* no GPIO9, bit 0 reserved */ ALTERNATE_FUNCTIONS(10, 1, 0, UNUSED, 1, 0, 0), /* GPIO10, altA and altB controlled by bit 0 */ - ALTERNATE_FUNCTIONS(11, 2, UNUSED, UNUSED, 0, 0, 0), /* GPIO11, altA controlled by bit 2 */ + ALTERNATE_FUNCTIONS(11, 2, 1, UNUSED, 0, 0, 0), /* GPIO11, altA controlled by bit 2 */ ALTERNATE_FUNCTIONS(12, UNUSED, UNUSED, UNUSED, 0, 0, 0), /* no GPIO12, bit3 reseved */ ALTERNATE_FUNCTIONS(13, 4, 3, 4, 1, 0, 2), /* GPIO13, altA altB and altC controlled by bit 3 and 4 */ ALTERNATE_FUNCTIONS(14, 5, UNUSED, UNUSED, 0, 0, 0), /* GPIO14, altA controlled by bit 5 */