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] [day] [month] [year] [list]
Date:	Thu, 10 Oct 2013 21:51:08 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Wolfram Sang <wsa@...-dreams.de>
CC:	Ionut Nicu <ioan.nicu.ext@....com>,
	Peter Korsgaard <peter.korsgaard@...co.com>,
	Alexander Sverdlin <alexander.sverdlin@....com>,
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-gpio@...r.kernel.org
Subject: Re: [PATCH 1/2] i2c-mux-gpio: test if the gpio can sleep

On 10/10/2013 09:43 PM, Wolfram Sang wrote:
> On Thu, Oct 10, 2013 at 10:46:41AM +0200, Lars-Peter Clausen wrote:
>
>>> +		if (gpio_cansleep(gpio))
>>> +			gpio_set_value_cansleep(gpio, val & (1 << i));
>>> +		else
>>> +			gpio_set_value(gpio, val & (1 << i));
>>
>> The proper way to do this is just always use the _cansleep() version.
>> gpio_set_value() only works for chips which do not sleep,
>> gpio_set_value_cansleep() works for both those who do sleep and those who do
>> not.
>
> To the gpio-list: Has it been considered to have sth. like
> gpio_set_value and gpio_set_value_nosleep? I'd think it makes more sense
> to have the specific function have the specific name.

It has been a few times, but I think the conclusion has always been that it is 
now too late to invert the semantics of gpio_set_value(). If you want to look 
up the discussions the keyword is gpio_set_value_atomic().

- Lars

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