<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/gpio, branch v3.17</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-09-02T08:09:43Z</updated>
<entry>
<title>gpio: move varargs hack outside #ifdef GPIOLIB</title>
<updated>2014-09-02T08:09:43Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-09-01T13:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0dbc8b7afef6e4fddcfebcbacbeb269a0a3b06d5'/>
<id>urn:sha1:0dbc8b7afef6e4fddcfebcbacbeb269a0a3b06d5</id>
<content type='text'>
commit 39b2bbe3d715cf5013b5c48695ccdd25bd3bf120
"gpio: add flags argument to gpiod_get*() functions"
added a dynamic flags argument to all the GPIOD getter
functions, however this did not cover the stubs so
when people used gpiod stubs to compile out descriptor
code, compilation failed.

Solve this by:
- Also rename all the stub functions __gpiod_*
- Moving the vararg hack outside of #ifdef CONFIG_GPIOLIB
  so these will always be available.

Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: move GPIOD flags outside #ifdef</title>
<updated>2014-08-21T12:44:36Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-08-19T17:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58b84f6a97f7f8811e0636836734809ff52cad43'/>
<id>urn:sha1:58b84f6a97f7f8811e0636836734809ff52cad43</id>
<content type='text'>
The GPIOD flags are defined inside the #ifdef CONFIG_GPIOLIB
switch, making the gpiolib stubs fail if these flags are used
by a consumer. This is not correct: the stubs should compile
fine without GPIOLIB.

Reported-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: add missing includes in machine.h</title>
<updated>2014-08-07T09:54:51Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-08-04T04:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b3ea074fd3c798bee861aa076dc2f873461ae26f'/>
<id>urn:sha1:b3ea074fd3c798bee861aa076dc2f873461ae26f</id>
<content type='text'>
linux/types.h and linux/list.h should be included so the typed used in
the header file are always properly declared.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reported-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: add flags argument to gpiod_get*() functions</title>
<updated>2014-07-28T10:28:05Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-07-25T14:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=39b2bbe3d715cf5013b5c48695ccdd25bd3bf120'/>
<id>urn:sha1:39b2bbe3d715cf5013b5c48695ccdd25bd3bf120</id>
<content type='text'>
The huge majority of GPIOs have their direction and initial value set
right after being obtained by one of the gpiod_get() functions. The
integer GPIO API had gpio_request_one() that took a convenience flags
parameter allowing to specify an direction and value applied to the
returned GPIO. This feature greatly simplifies client code and ensures
errors are always handled properly.

A similar feature has been requested for the gpiod API. Since setting
the direction of a GPIO is so often the very next action done after
obtaining its descriptor, we prefer to extend the existing functions
instead of introducing new functions that would raise the
number of gpiod getters to 16 (!).

The drawback of this approach is that all gpiod clients need to be
updated. To limit the pain, temporary macros are introduced that allow
gpiod_get*() to be called with or without the extra flags argument. They
will be removed once all consumer code has been updated.

Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Reviewed-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: split gpiod board registration into machine header</title>
<updated>2014-07-28T10:23:35Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-07-24T18:08:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0a6d315827eedc733d404ecff3cd4cc0e6437865'/>
<id>urn:sha1:0a6d315827eedc733d404ecff3cd4cc0e6437865</id>
<content type='text'>
As per example from the regulator subsystem: put all defines and
functions related to registering board info for GPIO descriptors
into a separate &lt;linux/gpio/machine.h&gt; header.

Cc: Andrew Victor &lt;linux@maxim.org.za&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Cc: Jean-Christophe Plagniol-Villard &lt;plagnioj@jcrosoft.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Reviewed-by: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: Export gpiochip_request_own_desc and gpiochip_free_own_desc</title>
<updated>2014-07-24T08:25:00Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-07-22T15:01:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7d4ad98fdd08932ffda2354c62e2e2ee059adcc'/>
<id>urn:sha1:f7d4ad98fdd08932ffda2354c62e2e2ee059adcc</id>
<content type='text'>
Both functions were introduced to let gpio drivers request their own
gpio pins. Without exporting the functions, this can however only be
used by gpio drivers built into the kernel.

Secondary impact is that the functions can not currently be used by
platform initialization code associated with the gpio-pca953x driver.
This code permits auto-export of gpio pins through platform data, but
if this functionality is used, the module can no longer be unloaded due
to the problem solved with the introduction of gpiochip_request_own_desc
and gpiochip_free_own_desc.

Export both function so they can be used from modules and from
platform initialization code.

Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: remove gpiod_lock/unlock_as_irq()</title>
<updated>2014-07-23T15:43:24Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-07-22T07:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d74be6dfea1b96cfb4bd79d9254fa9d21ed5f131'/>
<id>urn:sha1:d74be6dfea1b96cfb4bd79d9254fa9d21ed5f131</id>
<content type='text'>
gpio_lock/unlock_as_irq() are working with (chip, offset) arguments and
are thus not using the old integer namespace. Therefore, there is no
reason to have gpiod variants of these functions working with
descriptors, especially since the (chip, offset) tuple is more suitable
to the users of these functions (GPIO drivers, whereas GPIO descriptors
are targeted at GPIO consumers).

Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: make gpiochip_get_desc() gpiolib-private</title>
<updated>2014-07-23T15:41:12Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-07-22T07:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1bd6b601fe196b6fbce2c93536ce0f3f53577cec'/>
<id>urn:sha1:1bd6b601fe196b6fbce2c93536ce0f3f53577cec</id>
<content type='text'>
As GPIO descriptors are not going to remain unique anymore, having this
function public is not safe. Restrain its use to gpiolib since we have
no user outside of it.

Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: drop retval check enforcing from gpiochip_remove()</title>
<updated>2014-07-23T08:47:49Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-07-23T08:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=14c8a620ba436511b1347c592633befa49535176'/>
<id>urn:sha1:14c8a620ba436511b1347c592633befa49535176</id>
<content type='text'>
As we start to decomission the return value from gpiochip_remove()
the compilers emit warnings due to the function being tagged
__must_check. So drop this until we remove the return value
altogether.

Cc: Abdoulaye Berthe &lt;berthe.ab@gmail.com&gt;
Suggested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: include linux/bug.h in interface header</title>
<updated>2014-05-16T15:52:36Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2014-05-08T13:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdf86cd233207ed992a647f0b9d42c60735756e7'/>
<id>urn:sha1:cdf86cd233207ed992a647f0b9d42c60735756e7</id>
<content type='text'>
Today's linux-next kernel started showing build errors for the
use of WARN_ON in linux/gpio/consumer.h:

In file included from drivers/video/backlight/pwm_bl.c:13:0:
include/linux/gpio/consumer.h: In function 'gpiod_put':
include/linux/gpio/consumer.h:81:2: error: implicit declaration of function 'WARN_ON' [-Werror=implicit-function-declaration]

It's not clear why this never happened before, but this patch
fixes it by including the header that contains the defintion
of this macro.

Signed-off-by: Arnd Bergmann &lt;arnd@arnd.de&gt;
Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
