From patchwork Mon Feb 11 17:10:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2125131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 249BD3FCA4 for ; Mon, 11 Feb 2013 17:16:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U4wxI-00034x-Dc; Mon, 11 Feb 2013 17:14:12 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U4wvE-0001ZR-GJ for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2013 17:12:05 +0000 Received: by mail-pa0-f54.google.com with SMTP id fa10so3189399pad.27 for ; Mon, 11 Feb 2013 09:12:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=dvQnM5vgl74k4Spzew42cE5An4Dpptra+lI1d6bS2Tc=; b=ARd4DQIzzs3WJzJi50dL14XkwRPKYHCQECi2Gby7WtGP3WB2jEgWgs17jimxRZRi7Q e2bYdxmPrmpFuWowOTcUEVloENYxgypBlpn58R67n2491AksFCTCUcmTuUu5DAOZvmI5 7f4YYuPNHqh6qOQA+rim9Hv3NfxVwtXMwj+DaKk0nqEGyUOyc+iMEc9ImXSdFTzRra+h 88p4T0TpclH7JIwkGPiP+Bls6xGGHOzHzv20LFPV3PNwvL0tyP9gcLFW6RxHpBPXQGH+ AKjemGBXFtTORJ0RYLdTm71k6chhSNXe5f0AmZwcVL+57zMdOFCyWujPjA2z2rW19R6D bHPA== X-Received: by 10.66.89.138 with SMTP id bo10mr42730093pab.32.1360602722591; Mon, 11 Feb 2013 09:12:02 -0800 (PST) Received: from localhost.localdomain ([27.115.121.35]) by mx.google.com with ESMTPS id m3sm67935973pav.4.2013.02.11.09.11.57 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Feb 2013 09:12:01 -0800 (PST) From: Haojian Zhuang To: shiraz.hashim@st.com, shiraz.linux.kernel@gmail.com, linux@arm.linux.org.uk, tony@atomide.com, linux-arm-kernel@lists.infradead.org, swarren@nvidia.com, grant.likely@secretlab.ca, linus.walleij@linaro.org Subject: [PATCH v8 09/12] pinctrl: generic: add auto pull config parameter Date: Tue, 12 Feb 2013 01:10:56 +0800 Message-Id: <1360602659-4774-10-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360602659-4774-1-git-send-email-haojian.zhuang@linaro.org> References: <1360602659-4774-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQnx5s0qkc4VEB+Vu3vVxAFzriB3ywjnMHqGv4M7IHw9BHxrFpA7c9g3jOhWLCQPNwpLJ+c2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130211_121204_687826_A1F9C809 X-CRM114-Status: GOOD ( 13.02 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.54 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There's only one bit to control pin bias as enabled or disabled for some pins in OMAP SoC. So append PIN_CONFIG_BIAS_AUTO_PULL for this case. User shouldn't switch pin state between AUTO_PULL and PULL_UP/PULL_DOWN, since they're similiar concepts. Signed-off-by: Haojian Zhuang --- drivers/pinctrl/pinconf-generic.c | 1 + include/linux/pinctrl/pinconf-generic.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index ef24230..4a67848 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -37,6 +37,7 @@ struct pin_config_item { struct pin_config_item conf_items[] = { PCONFDUMP(PIN_CONFIG_BIAS_DISABLE, "input bias disabled", NULL), PCONFDUMP(PIN_CONFIG_BIAS_HIGH_IMPEDANCE, "input bias high impedance", NULL), + PCONFDUMP(PIN_CONFIG_BIAS_AUTO_PULL, "input bias auto pull", NULL), PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL), PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL), PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL), diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 3e7909a..f2daff4 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -29,6 +29,8 @@ * if for example some other pin is going to drive the signal connected * to it for a while. Pins used for input are usually always high * impedance. + * @PIN_CONFIG_BIAS_AUTO_PULL: the pin will be pulled without specifying + * pull-up or pull-down. * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high * impedance to VDD). If the argument is != 0 pull-up is enabled, * if it is 0, pull-up is disabled. @@ -76,6 +78,7 @@ enum pin_config_param { PIN_CONFIG_BIAS_DISABLE, PIN_CONFIG_BIAS_HIGH_IMPEDANCE, + PIN_CONFIG_BIAS_AUTO_PULL, PIN_CONFIG_BIAS_PULL_UP, PIN_CONFIG_BIAS_PULL_DOWN, PIN_CONFIG_DRIVE_PUSH_PULL,