<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/gpio.h, branch T20_LinuxImageV2.0Beta1_20121218</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>gpio: gpiolib: Support for open source/emitter gpios</title>
<updated>2012-03-08T06:24:27+00:00</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2012-02-17T14:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=806c13eb6bda41bdceb65ae7478b08965e1a4d5d'/>
<id>806c13eb6bda41bdceb65ae7478b08965e1a4d5d</id>
<content type='text'>
Adding support for the open source gpio on which client
can specify the open source property through GPIO flag
GPIOF_OPEN_SOURCE at the time of gpio request.
The open source pins are normally pulled low and it
cannot be driven to output with value of 0 and so
when client request for setting the pin to LOW, the
gpio will be set to input direction to make pin in tristate
and hence PULL-DOWN on pins will make the state to LOW.
The open source pin can be driven to HIGH by setting output
with value of 1.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

cherry-picked from mainline commit
	25553ff0756c59b617af6bdd280c94e943164184

Change-Id: I3062a5dec7bf745b624d9a147f79d3830927325b
Reviewed-on: http://git-master/r/88265
Reviewed-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Tested-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for the open source gpio on which client
can specify the open source property through GPIO flag
GPIOF_OPEN_SOURCE at the time of gpio request.
The open source pins are normally pulled low and it
cannot be driven to output with value of 0 and so
when client request for setting the pin to LOW, the
gpio will be set to input direction to make pin in tristate
and hence PULL-DOWN on pins will make the state to LOW.
The open source pin can be driven to HIGH by setting output
with value of 1.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

cherry-picked from mainline commit
	25553ff0756c59b617af6bdd280c94e943164184

Change-Id: I3062a5dec7bf745b624d9a147f79d3830927325b
Reviewed-on: http://git-master/r/88265
Reviewed-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Tested-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: gpiolib: Support for open drain/collector gpios</title>
<updated>2012-03-08T06:24:14+00:00</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2012-02-17T14:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38ca86e591ad3e80e21d40ff647622a85e110f95'/>
<id>38ca86e591ad3e80e21d40ff647622a85e110f95</id>
<content type='text'>
Adding support for the open drain gpio on which client
can specify the open drain property through GPIO flag
GPIOF_OPEN_DRAIN at the time of gpio request.
The open drain pins are normally pulled high and it
cannot be driven to output with value of 1 and so
when client request for setting the pin to HIGH, the
gpio will be set to input direction to make pin in tristate
and hence PULL-UP on pins will make the state to HIGH.
The open drain pin can be driven to LOW by setting output
with value of 0.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

Cherry-picked from mainline
	aca5ce14eb773a75e5d935968b2e390dc5bd29c3

Change-Id: I097caebcc7cf6fb1497bb0395320dfc061bb6277
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviewed-on: http://git-master/r/88264
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for the open drain gpio on which client
can specify the open drain property through GPIO flag
GPIOF_OPEN_DRAIN at the time of gpio request.
The open drain pins are normally pulled high and it
cannot be driven to output with value of 1 and so
when client request for setting the pin to HIGH, the
gpio will be set to input direction to make pin in tristate
and hence PULL-UP on pins will make the state to HIGH.
The open drain pin can be driven to LOW by setting output
with value of 0.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

Cherry-picked from mainline
	aca5ce14eb773a75e5d935968b2e390dc5bd29c3

Change-Id: I097caebcc7cf6fb1497bb0395320dfc061bb6277
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviewed-on: http://git-master/r/88264
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: add GPIOF_ values regardless on kconfig settings</title>
<updated>2011-06-16T14:40:52+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2011-06-15T00:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c001fb72a7b705f902bdfdd05b5d2408efe6f848'/>
<id>c001fb72a7b705f902bdfdd05b5d2408efe6f848</id>
<content type='text'>
Make GPIOF_ defined values available even when GPIOLIB nor GENERIC_GPIO
is enabled by moving them to &lt;linux/gpio.h&gt;.

Fixes these build errors in linux-next:
sound/soc/codecs/ak4641.c:524: error: 'GPIOF_OUT_INIT_LOW' undeclared (first use in this function)
sound/soc/codecs/wm8915.c:2921: error: 'GPIOF_OUT_INIT_LOW' undeclared (first use in this function)

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make GPIOF_ defined values available even when GPIOLIB nor GENERIC_GPIO
is enabled by moving them to &lt;linux/gpio.h&gt;.

Fixes these build errors in linux-next:
sound/soc/codecs/ak4641.c:524: error: 'GPIOF_OUT_INIT_LOW' undeclared (first use in this function)
sound/soc/codecs/wm8915.c:2921: error: 'GPIOF_OUT_INIT_LOW' undeclared (first use in this function)

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: make gpio_{request,free}_array gpio array parameter const</title>
<updated>2011-05-27T23:56:45+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2011-05-25T23:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c295975a85b049385dfe0d5ee0d4d543619fbdc'/>
<id>7c295975a85b049385dfe0d5ee0d4d543619fbdc</id>
<content type='text'>
gpio_{request,free}_array should not (and do not) modify the passed gpio
array, so make the parameter const.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gpio_{request,free}_array should not (and do not) modify the passed gpio
array, so make the parameter const.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: Convert gpio_is_valid to return bool</title>
<updated>2011-05-27T03:02:43+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-05-10T23:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3474cb3cc0140f9cf6ca56983f8180b4b4c5c36a'/>
<id>3474cb3cc0140f9cf6ca56983f8180b4b4c5c36a</id>
<content type='text'>
Make the code a bit more readable.

Instead of casting an int to an unsigned then comparing to
MAX_NR_GPIOS, add a &gt;= 0 test and let the compiler optimizer
do the conversion to unsigned.

The generated code should be the same.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the code a bit more readable.

Instead of casting an int to an unsigned then comparing to
MAX_NR_GPIOS, add a &gt;= 0 test and let the compiler optimizer
do the conversion to unsigned.

The generated code should be the same.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include/gpio.h: remove remaining __must_check-annotiations</title>
<updated>2011-01-14T16:06:39+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2011-01-14T08:34:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=323b7fe8f8f6d5ac6214382cf30e8b3a80b265c9'/>
<id>323b7fe8f8f6d5ac6214382cf30e8b3a80b265c9</id>
<content type='text'>
Commit 5f829e405ec4e96f711165a4a7b55c271d4363e2 (gpiolib: add missing functions
to generic fallback) also introduced two.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 5f829e405ec4e96f711165a4a7b55c271d4363e2 (gpiolib: add missing functions
to generic fallback) also introduced two.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "gpiolib: annotate gpio-intialization with __must_check"</title>
<updated>2011-01-14T01:26:46+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-14T01:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d8a3515e2a9523f8ed56d1f4537d16338bda2bc2'/>
<id>d8a3515e2a9523f8ed56d1f4537d16338bda2bc2</id>
<content type='text'>
This reverts commit 0fdae42d361bbb431ca0ab0efed5126a94821177, which
wasn't really supposed to go in, and causes lots of annoying warnings.

Quoth Andrew:
  "Complete brainfart - I meant to drop that patch ages ago."

Quoth Greg:
  "Ick, yeah, that patch isn't ok to go in as-is, all of the callers
   need to be fixed up first, which is what I thought we had agreed on..."

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0fdae42d361bbb431ca0ab0efed5126a94821177, which
wasn't really supposed to go in, and causes lots of annoying warnings.

Quoth Andrew:
  "Complete brainfart - I meant to drop that patch ages ago."

Quoth Greg:
  "Ick, yeah, that patch isn't ok to go in as-is, all of the callers
   need to be fixed up first, which is what I thought we had agreed on..."

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: add missing functions to generic fallback</title>
<updated>2011-01-13T16:03:15+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2011-01-13T01:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5f829e405ec4e96f711165a4a7b55c271d4363e2'/>
<id>5f829e405ec4e96f711165a4a7b55c271d4363e2</id>
<content type='text'>
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: annotate gpio-intialization with __must_check</title>
<updated>2011-01-13T16:03:14+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2011-01-13T01:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0fdae42d361bbb431ca0ab0efed5126a94821177'/>
<id>0fdae42d361bbb431ca0ab0efed5126a94821177</id>
<content type='text'>
Because GPIOs can have crucial functions especially in embedded systems,
we are better safe than sorry regarding their configuration.  For
gpio_request, the documentation is simply enforced: &lt;quote&gt;"The return
value of gpio_request() must be checked."&lt;/quote&gt; For gpio_direction_* and
gpio_request_*, we now act accordingly.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because GPIOs can have crucial functions especially in embedded systems,
we are better safe than sorry regarding their configuration.  For
gpio_request, the documentation is simply enforced: &lt;quote&gt;"The return
value of gpio_request() must be checked."&lt;/quote&gt; For gpio_direction_* and
gpio_request_*, we now act accordingly.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: Add 'struct gpio_chip' forward declaration for !GPIOLIB case</title>
<updated>2010-09-01T14:55:24+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>cbouatmailru@gmail.com</email>
</author>
<published>2010-09-01T14:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e4438b86527e8bf1f49503a30d487e401e64f9c'/>
<id>4e4438b86527e8bf1f49503a30d487e401e64f9c</id>
<content type='text'>
With CONFIG_GPIOLIB=n, the 'struct gpio_chip' is not declared,
so the following pops up on PowerPC:

  cc1: warnings being treated as errors
  In file included from arch/powerpc/platforms/52xx/mpc52xx_common.c:19:
  include/linux/of_gpio.h:74: warning: 'struct gpio_chip' declared
                              inside parameter list
  include/linux/of_gpio.h:74: warning: its scope is only this definition
                              or declaration, which is probably not what
			      you want
  include/linux/of_gpio.h:75: warning: 'struct gpio_chip' declared
                              inside parameter list
  make[2]: *** [arch/powerpc/platforms/52xx/mpc52xx_common.o] Error 1

This patch fixes the issue by providing the proper forward declaration.

Signed-off-by: Anton Vorontsov &lt;cbouatmailru@gmail.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With CONFIG_GPIOLIB=n, the 'struct gpio_chip' is not declared,
so the following pops up on PowerPC:

  cc1: warnings being treated as errors
  In file included from arch/powerpc/platforms/52xx/mpc52xx_common.c:19:
  include/linux/of_gpio.h:74: warning: 'struct gpio_chip' declared
                              inside parameter list
  include/linux/of_gpio.h:74: warning: its scope is only this definition
                              or declaration, which is probably not what
			      you want
  include/linux/of_gpio.h:75: warning: 'struct gpio_chip' declared
                              inside parameter list
  make[2]: *** [arch/powerpc/platforms/52xx/mpc52xx_common.o] Error 1

This patch fixes the issue by providing the proper forward declaration.

Signed-off-by: Anton Vorontsov &lt;cbouatmailru@gmail.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
</feed>
