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: <521F9CC9.4010004@wwwdotorg.org>
Date:	Thu, 29 Aug 2013 13:11:05 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	George Cherian <george.cherian@...com>
CC:	Chanwoo Choi <cw00.choi@...sung.com>, balbi@...com,
	myungjoo.ham@...sung.com, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	grant.likely@...aro.org, rob@...dley.net, ian.campbell@...rix.com,
	mark.rutland@....com, pawel.moll@....com, rob.herring@...xeda.com,
	linux-omap@...r.kernel.org, linux-usb@...r.kernel.org,
	bcousson@...libre.com, davidb@...eaurora.org, arnd@...db.de,
	swarren@...dia.com, popcornmix@...il.com
Subject: Re: [PATCH v3 1/3] extcon: extcon-gpio-usbvid: Generic USB VBUS/ID
 detection via GPIO

On 08/29/2013 05:48 AM, George Cherian wrote:
> On 8/29/2013 4:07 PM, Chanwoo Choi wrote:
...
>> I tested various development board based on Samsung Exynos series SoC.
>> Although some gpio of Exynos series SoC set high state(non zero, 1) as
>> default value,
>> this gpio state could mean off state, disconnected or un-powered state
>> according to gpio.
>> Of course, above explanation about specific gpio don't include all gpios.
>> This is meaning that there is possibility.
>
> okay then how about adding a flag for inverted logic too.  something
> like this
> 
> if(of_property_read_bool(np,"inverted_gpio))
>     gpio_usbvid->gpio_inv = 1;
>
> And always check on this before deciding?

Don't do this. GPIO specifiers in DT typically include a "flags" cell
that describes certain GPIO properties. One of those properties is
signal inversion. You can use of_get_named_gpio_flags() to retrieve
those flags.
--
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