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  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:	Mon, 11 Nov 2013 11:01:02 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Sherman Yin <syin@...adcom.com>
Cc:	Stephen Warren <swarren@...dotorg.org>,
	Heiko Stübner <heiko@...ech.de>,
	Laxman Dewangan <ldewangan@...dia.com>,
	Mark Rutland <mark.rutland@....com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Christian Daudt <bcm@...thebug.org>,
	Russell King <linux@....linux.org.uk>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Rob Herring <rob.herring@...xeda.com>,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
	Rob Landley <rob@...dley.net>,
	Grant Likely <grant.likely@...aro.org>,
	Matt Porter <matt.porter@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver

On Fri, Nov 8, 2013 at 1:29 AM, Sherman Yin <syin@...adcom.com> wrote:
> [Me]
>> On Wed, Nov 6, 2013 at 3:02 AM, Sherman Yin <syin@...adcom.com> wrote:

>> You would have to patch the OF core to do something like that:
>>
>> bias-pull-up = <true true false>;
>>
>> 1/0 isn't so good I think, what should the parser do with e.g. 2?
>> This is more to the point.
>
> I would imagine that the platform-specific device tree bindings would need
> to clearly explain what the valid values are, as they should.

But this is not a platform-specific binding. These are the
generic pin configuration bindings we're talking about.

> If we're
> using integers, we could either have a) !0 and 0, or b) just 1 and 0, and
> everything else is an error.  Or c) the platform could decide that the value
> provides addition info like pull-up-strength, so 0 = no pull up, >0 = pull
> up enabled and the number is the pull up strength in Ohm (bindings should
> indicate which values are valid), and everything else is an error.

That seems to make sense, I've just not seen any system (using
device tree) that can actually set the pull up/down resistance.

>> That said, if you can patch the OF core and the generic pin config
>> parser to do what you want with lists like that, it's your pick.
>> It may take some time though.
>
> I don't mind patching the generic pin config, and I don't think the core
> needs to change,

If you want arrays of booleans that is a matter for the OF core
parser I think.

>> What about you patch include/linux/pinctrl/pinconf-generic.h
>> to add PIN_CONFIG_INPUT_DISABLE with this semantic
>> and also patch the generic pinconf parser in
>> drivers/pinctrl/pinconf-generic.c
>> to handle this?
>
> Sure, I can add PIN_CONFIG_INPUT_DISABLE.  However I suspect people might be
> confused by this and PIN_CONFIG_OUTPUT.

Just make sure you put in good documentation in that file
right there, it's using kerneldoc and for a good reason...

Yours,
Linus Walleij
--
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