From patchwork Wed Apr 3 20:15:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 15885 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 42D4923E06 for ; Wed, 3 Apr 2013 20:16:01 +0000 (UTC) Received: from mail-gg0-f200.google.com (mail-gg0-f200.google.com [209.85.161.200]) by fiordland.canonical.com (Postfix) with ESMTP id D3AEBA189FE for ; Wed, 3 Apr 2013 20:16:00 +0000 (UTC) Received: by mail-gg0-f200.google.com with SMTP id i2sf2490484ggn.7 for ; Wed, 03 Apr 2013 13:16:00 -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=xZ/zZVUrwEWcbEnE8Gk4fF5Ow/Ho/K3WJYaN6wK3NXw=; b=e2DYWhz/QDn38iQUnaRnIk7uQqWjJjKIqiDzi6E96ViaVwpCK/lCwbVjCn/no7mV8p W5MZjyX9BUG3C/xrYqS1+udZw/XjBRYPlNMkqo5I5Dx0eOYfRnl2tdYrVkGkchFtxlxe acDJKUqd24rwQ4lFgqz14xxZ7Nf6Peiue4Ifu0o9o6aT1uUarSeUaH7boCU3DDUyDHNW qi3wFRJu6j0qwCfrpyWYzwux1I4eqc0D0MnnzK1EMFo0rC1ONPVsXpIk0yAdfwlrOg5C mHKisLaGvqY5YSWXkHtxS+BFY0uubh+nOREZnz+Kd0nj6D4ZrOIFK+eL3daYlj/qo0qG jHjQ== X-Received: by 10.236.91.206 with SMTP id h54mr1428799yhf.27.1365020160344; Wed, 03 Apr 2013 13:16:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.103.169 with SMTP id fx9ls1103141qeb.3.gmail; Wed, 03 Apr 2013 13:16:00 -0700 (PDT) X-Received: by 10.58.144.133 with SMTP id sm5mr2514202veb.23.1365020160011; Wed, 03 Apr 2013 13:16:00 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id p12si2629003vce.22.2013.04.03.13.15.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 13:15:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id m17so1810490vca.11 for ; Wed, 03 Apr 2013 13:15:59 -0700 (PDT) X-Received: by 10.52.233.225 with SMTP id tz1mr2180789vdc.54.1365020159821; Wed, 03 Apr 2013 13:15:59 -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 cg12csp185892ved; Wed, 3 Apr 2013 13:15:59 -0700 (PDT) X-Received: by 10.14.3.133 with SMTP id 5mr5709821eeh.43.1365020158291; Wed, 03 Apr 2013 13:15:58 -0700 (PDT) Received: from eu1sys200aog113.obsmtp.com (eu1sys200aog113.obsmtp.com [207.126.144.135]) by mx.google.com with SMTP id w41si9911487eel.139.2013.04.03.13.15.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 13:15:58 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.135 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.135; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob113.postini.com ([207.126.147.11]) with SMTP ID DSNKUVyN+PT4cB08Vv2LyoGLBRc5EjmzVHYd@postini.com; Wed, 03 Apr 2013 20:15:58 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id F15D0EC; Wed, 3 Apr 2013 20:15:48 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AD945A290; Wed, 3 Apr 2013 20:15:48 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 71AE8A8083; Wed, 3 Apr 2013 22:15:40 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.279.5; Wed, 3 Apr 2013 22:15:48 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Patrice Chotard , Linus Walleij Subject: [PATCH] pinctrl/abx500: fix ab9540 alternate function Date: Wed, 3 Apr 2013 22:15:44 +0200 Message-ID: <1365020144-28781-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: ALoCoQnbT+Ofl8+kDZ25WRd7teOnWtkpHHACV2+dCd+J9TFUtv9FT+z9ZtT0pJDRfOVvRnvLe4yp X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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. Same issue has been fixed in pinctrl-ab8505.c Signed-off-by: Patrice Chotard Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-ab9540.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-ab9540.c b/drivers/pinctrl/pinctrl-ab9540.c index 7610bd0..80f3173 100644 --- a/drivers/pinctrl/pinctrl-ab9540.c +++ b/drivers/pinctrl/pinctrl-ab9540.c @@ -393,7 +393,7 @@ struct alternate_functions ab9540alternate_functions[AB9540_GPIO_MAX_NUMBER + 1] /* GPIOSEL2 - bits 0 and 3 are reserved */ ALTERNATE_FUNCTIONS(9, UNUSED, UNUSED, UNUSED, 0, 0, 0), /* no GPIO9 */ 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 1 */ + ALTERNATE_FUNCTIONS(11, 2, 1, UNUSED, 0, 0, 0), /* GPIO11, altA controlled by bit 1 */ ALTERNATE_FUNCTIONS(12, UNUSED, UNUSED, UNUSED, 0, 0, 0), /* no GPIO12 */ 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 */