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]
Date:	Tue, 27 May 2014 15:09:20 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	James Hogan <james.hogan@...tec.com>,
	Stephen Warren <swarren@...dia.com>,
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pinctrl: Enable "power-source" to be extracted from DT files

Am Dienstag, 27. Mai 2014, 09:27:36 schrieb Ivan T. Ivanov:
> From: "Ivan T. Ivanov" <iivanov@...sol.com>
> 
> Add "power-source" property to generic options used for DT parsing files.
> This  enables drivers, which use generic pin configurations, to get the
> value passed to this property.

I think the main problem here is, that pinconf-generic.h defines the power-
source as having a "custom format". With DT as a hardware description, 
implementaton specific values do not work well - instead it should have a 
regular unit-value.

For the power-source I think volts could work well - as this is the main use-
case for pinctrl I know. The regulator-binding uses microvolts, maybe it would 
be good use a similar unit.

So something along

--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -156,6 +156,7 @@ input-disable		- disable input on pin (no effect on
output) input-schmitt-enable	- enable schmitt-trigger mode
 input-schmitt-disable	- disable schmitt-trigger mode
 input-debounce		- debounce mode with debound time X
+power-source		- set power supply to X microvolts
 low-power-enable	- enable low power mode
 low-power-disable	- disable low power mode
 output-low		- set the pin to output mode with low level

and in the dt itself:

	pcfg_1v8 {
		power-source = <1800000>;
	};

And then the pinctrl driver being responsible to select an appropriate source 
for this voltage.

But I guess Linus knows more pinctrl corner-cases than me, so this may be 
entire rubbish :-) .


Heiko

> Signed-off-by: Ivan T. Ivanov <iivanov@...sol.com>
> ---
>  Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 1 +
>  drivers/pinctrl/pinconf-generic.c                              | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index
> 4414163..fa40a17 100644
> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> @@ -156,6 +156,7 @@ input-disable		- disable input on pin (no effect on
> output) input-schmitt-enable	- enable schmitt-trigger mode
>  input-schmitt-disable	- disable schmitt-trigger mode
>  input-debounce		- debounce mode with debound time X
> +power-source		- select between different power supplies
>  low-power-enable	- enable low power mode
>  low-power-disable	- disable low power mode
>  output-low		- set the pin to output mode with low level
> diff --git a/drivers/pinctrl/pinconf-generic.c
> b/drivers/pinctrl/pinconf-generic.c index 3d9a999..c7ead91 100644
> --- a/drivers/pinctrl/pinconf-generic.c
> +++ b/drivers/pinctrl/pinconf-generic.c
> @@ -166,6 +166,7 @@ static struct pinconf_generic_dt_params dt_params[] = {
>  	{ "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
>  	{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
>  	{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
> +	{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
>  	{ "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
>  	{ "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
>  	{ "output-low", PIN_CONFIG_OUTPUT, 0, },
> --
> 1.8.3.2

--
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