lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51C22A95.4050703@wwwdotorg.org>
Date:	Wed, 19 Jun 2013 16:03:01 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Linus Walleij <linus.walleij@...ricsson.com>
CC:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	James Hogan <james.hogan@...tec.com>,
	Stephen Warren <swarren@...dia.com>,
	� <heiko@...ech.de>,
	Linus Walleij <linus.walleij@...aro.org>,
	Anmar Oueja <anmar.oueja@...aro.org>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>
Subject: Re: [PATCH] pinctrl: establish pull-up/pull-down terminology

On 06/16/2013 04:45 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@...aro.org>
> 
> 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 <heiko@...ech.de>
> Cc: James Hogan <james.hogan@...tec.com>
> Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  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.

Why treat PULL_UP/PULL_DOWN differently from PULL_PIN_DEFAULT?
PULL_PIN_DEFAULT is logically simply a macro that selects PULL_UP/DOWN
based on what's "normal" for the pin's expected usage, so surely the
value associated with that option should behave identically?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ