From patchwork Sun Jun 16 10:45:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 17933 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBFBE2391D for ; Sun, 16 Jun 2013 10:46:32 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id cr7sf2220865qab.9 for ; Sun, 16 Jun 2013 03:46:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to: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 :content-transfer-encoding; bh=mkTqiwbc+BtIqjlC9rHpJe9dXNtD0DHXQDWyG4SUN18=; b=DSY21Ed9Gs05yub01BwUavBEf86nCaIGyJtQI7yuk4wItMh3J1L4xv53XnMNbWzruU drvEPkXpHk030cwZq45x7JojNRD1ZxA6pAg/lJO+7DWnkJm5Lr06f5iOdihhDWlTMeBY aI1rol2sZ7nxGqEMZNISjvkSxiVY8PAP7e6JdHFz7h53/HcRhl+IH2sNPPEEwXQXpRT1 f/oDsGzEu+8YHqaKFmwzfnOR4QTE+bHZlRAgdJvrjeFcQUbJf2jX0EH5H9LlYpZ1rrpP 3UjScYq3sU0Mfz0pWCQCxrLDZavLZNrazBtzrwdcdYhI1ZSIUWPhm9LQjPBSEvHVPcGq SJ6g== X-Received: by 10.224.174.145 with SMTP id t17mr5359616qaz.4.1371379592464; Sun, 16 Jun 2013 03:46:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.4 with SMTP id h4ls757940qen.50.gmail; Sun, 16 Jun 2013 03:46:32 -0700 (PDT) X-Received: by 10.52.97.71 with SMTP id dy7mr2480720vdb.40.1371379592155; Sun, 16 Jun 2013 03:46:32 -0700 (PDT) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [2607:f8b0:400c:c01::233]) by mx.google.com with ESMTPS id vg3si1954924vec.100.2013.06.16.03.46.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Jun 2013 03:46:32 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::233 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:c01::233; Received: by mail-ve0-f179.google.com with SMTP id d10so1428078vea.24 for ; Sun, 16 Jun 2013 03:46:32 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr3144158vcg.52.1371379591920; Sun, 16 Jun 2013 03:46:31 -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.58.165.8 with SMTP id yu8csp1371veb; Sun, 16 Jun 2013 03:46:31 -0700 (PDT) X-Received: by 10.15.22.199 with SMTP id f47mr11716832eeu.47.1371379590436; Sun, 16 Jun 2013 03:46:30 -0700 (PDT) Received: from eu1sys200aog124.obsmtp.com (eu1sys200aog124.obsmtp.com [207.126.144.157]) by mx.google.com with SMTP id s8si8391040ees.358.2013.06.16.03.46.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 16 Jun 2013 03:46:30 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.157 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.157; Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob124.postini.com ([207.126.147.11]) with SMTP ID DSNKUb2XaOkwKUZqa5iVAEfwN/uPhdfKUfzC@postini.com; Sun, 16 Jun 2013 10:46:30 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 7AB414A; Sun, 16 Jun 2013 10:44:51 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6F4603F; Sun, 16 Jun 2013 10:45:52 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 67054A8072; Sun, 16 Jun 2013 12:45:47 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Sun, 16 Jun 2013 12:45:51 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , =?UTF-8?q?Heiko=20St=FCbner?= , James Hogan , Laurent Pinchart Subject: [PATCH] pinctrl: establish pull-up/pull-down terminology Date: Sun, 16 Jun 2013 12:45:48 +0200 Message-ID: <1371379548-6482-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: ALoCoQldYluglKhulujRtC9ngmh6VZLYFGk2lBJYfjDX8g4oxgR2ROBjJnlV6SN5745V+pqVGgNO X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::233 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: Linus Walleij It is counter-intuitive to have "0" mean disable in a boolean manner for electronic properties of pins such as pull-up and pull-down. Therefore, define that a pull-up/pull-down argument of 0 to such a generic option means that the pin is short-circuited to VDD or GROUND. Pull disablement shall be done using PIN_CONFIG_BIAS_DISABLE. Cc: Heiko Stübner Cc: James Hogan Cc: Laurent Pinchart Signed-off-by: Linus Walleij --- include/linux/pinctrl/pinconf-generic.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index d414a77..67780f5 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -36,14 +36,15 @@ * tristate. The argument is ignored. * @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. + * if it is 0, pull-up it total, i.e. the pin is connected to VDD. * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high * impedance to GROUND). If the argument is != 0 pull-down is enabled, - * if it is 0, pull-down is disabled. + * if it is 0, pull-down is total, i.e. the pin is connected to GROUND. * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based * on embedded knowledge of the controller, like current mux function. - * If the argument is != 0 pull up/down is enabled, if it is 0, - * the pull is disabled. + * If the argument is != 0 pull up/down is enabled, if it is 0, the + * configuration is ignored. The proper way to disable it is to use + * @PIN_CONFIG_BIAS_DISABLE. * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and * low, this is the most typical case and is typically achieved with two * active transistors on the output. Setting this config will enable @@ -72,8 +73,8 @@ * supplies, the argument to this parameter (on a custom format) tells * the driver which alternative power source to use. * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to - * this parameter (on a custom format) tells the driver which alternative - * slew rate to use. + * this parameter (on a custom format) tells the driver which alternative + * slew rate to use. * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power * operation, if several modes of operation are supported these can be * passed in the argument on a custom form, else just use argument 1