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: 14750 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 17C2B23DEA for ; Mon, 11 Feb 2013 17:12:05 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id C8078A19314 for ; Mon, 11 Feb 2013 17:12:04 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so5311804veb.9 for ; Mon, 11 Feb 2013 09:12:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=dvQnM5vgl74k4Spzew42cE5An4Dpptra+lI1d6bS2Tc=; b=JaDwCN0au1NzN2jXlzvCmn1WmpaPXN6430O/sizRR+mGuCBj2E/3nB76MQeqSVSN7l BZZhA3gZgxq46v5YTzo26oEuhN7H3QqsscHzQN1s/fbPfEWybpesaQMY3G0cKiDLutrO fuBxR9ydk9HTxRhmNk62fb+ng0b8IpnLI8fYt4uEYdusa4qyO+R6L5tKcITnH1ztANOc SwCJDMDTOyyEzZD8KEoHpEuaXLOYqwrKeyafhC/ELFG9OTo82VDhZAZ0x2bSSLCs3K9Y lVwaMdxGHMKvykL3xhegwCERaHzkY/bExPyph35tyUO4mnpuoyAYgT3QdDgjv9IK8sAF MgaQ== X-Received: by 10.58.76.193 with SMTP id m1mr1971677vew.4.1360602724309; Mon, 11 Feb 2013 09:12:04 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp108028vec; Mon, 11 Feb 2013 09:12:03 -0800 (PST) X-Received: by 10.50.161.130 with SMTP id xs2mr13121974igb.34.1360602723245; Mon, 11 Feb 2013 09:12:03 -0800 (PST) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id t5si13073182paw.310.2013.02.11.09.12.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Feb 2013 09:12:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.41; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pa0-f41.google.com with SMTP id fb11so3139697pad.14 for ; Mon, 11 Feb 2013 09:12:02 -0800 (PST) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQkYJ44tJ25naNX/pEqi6P7Ah6/LrlRe1p6FSYkDQ1bHU7VgZAqwgSgCqqtjqpAddoeKS5lG 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,