<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/of_gpio.h, branch v3.18.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-05-21T09:14:46Z</updated>
<entry>
<title>gpio: make of_get_named_gpiod_flags() private</title>
<updated>2014-05-21T09:14:46Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-05-17T05:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f01d907582f8461546379aa415a7c6d5cfb8e5fd'/>
<id>urn:sha1:f01d907582f8461546379aa415a7c6d5cfb8e5fd</id>
<content type='text'>
of_get_named_gpiod_flags() is visible and directly usable by GPIO
consumers, but it really should not as the gpiod interface relies
on the simpler gpiod_get() to provide properly-configured GPIOs.

of_get_named_gpiod_flags() is just used internally by gpiolib to
implement gpiod_get(), and by the old of_get_named_gpio_flags()
function, therefore it makes sense to make it gpiolib-private.

As a side-effect, the unused (and unneeded) of_get_gpiod_flags()
inline function is also removed, and of_get_named_gpio_flags() is moved
from a static inline function to a regular one in gpiolib-of.c

This results in all references to gpiod_* functions in of_gpio.h being
gone, which is the way it should be since this file is part of the old
integer GPIO interface.

Changes since v1:
- Fixed compilation error when CONFIG_OF_GPIO is not defined
- Fixed warning due to of_gpio_flags enum not being declared
  in private gpiolib.h header

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>gpiolib: include gpio/consumer.h in of_gpio.h for desc_to_gpio()</title>
<updated>2013-10-30T01:26:14Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2013-10-29T09:10:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=335d7a7d63aa3a6da4d4903ef6e64de4a88f27da'/>
<id>urn:sha1:335d7a7d63aa3a6da4d4903ef6e64de4a88f27da</id>
<content type='text'>
Fixes this build error on sparc:

In file included from drivers/spi/spi.c:33:0:
include/linux/of_gpio.h: In function 'of_get_named_gpio_flags':
include/linux/of_gpio.h:93:3: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]

Signed-off-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>gpiolib: port of_ functions to use gpiod</title>
<updated>2013-10-19T21:24:52Z</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2013-10-17T17:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af8b6375a8291fe2cf77707f3edec86b98a999cc'/>
<id>urn:sha1:af8b6375a8291fe2cf77707f3edec86b98a999cc</id>
<content type='text'>
Refactor the of_ functions of gpiolib to use the now public gpiod
interface, and export of_get_named_gpiod_flags() and
of_get_gpiod_flags() functions.

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 of_count_named_gpios() use new of_count_phandle_with_args()</title>
<updated>2013-02-13T10:11:53Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2013-02-12T17:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e80beb27d2f81a1c3c8887e0e0a82d77bb392d28'/>
<id>urn:sha1:e80beb27d2f81a1c3c8887e0e0a82d77bb392d28</id>
<content type='text'>
This patch replaces the horribly coded of_count_named_gpios() with a
call to of_count_phandle_with_args() which is far more efficient. This
also changes the return value of of_gpio_count() &amp; of_gpio_named_count()
from 'unsigned int' to 'int' so that it can return an error code. All
the users of that function are fixed up to correctly handle a negative
return value.

v2: Split GPIO portion into a separate patch

Tested-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>gpio: Adjust of_xlate API to support multiple GPIO chips</title>
<updated>2012-05-18T22:48:36Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-05-17T19:54:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3d0f7cf0f3633f92ddeb767eb59cab73963d4dee'/>
<id>urn:sha1:3d0f7cf0f3633f92ddeb767eb59cab73963d4dee</id>
<content type='text'>
This patch changes the of_xlate API to make it possible for multiple
gpio_chips to refer to the same device tree node.  This is useful for
banked GPIO controllers that use multiple gpio_chips for a single
device.  With this change the core code will try calling of_xlate on
each gpio_chip that references the device_node and will return the
gpio number for the first one to return 'true'.

Tested-by: Roland Stigge &lt;stigge@antcom.de&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of_gpio: add support of of_gpio_named_count to be able to count named gpio</title>
<updated>2012-02-06T06:08:30Z</updated>
<author>
<name>Jean-Christophe PLAGNIOL-VILLARD</name>
<email>plagnioj@jcrosoft.com</email>
</author>
<published>2012-02-02T15:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ff64abefb6680dfc2aca7ecaa5e695949e7335c9'/>
<id>urn:sha1:ff64abefb6680dfc2aca7ecaa5e695949e7335c9</id>
<content type='text'>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: create of_phandle_args to simplify return of phandle parsing data</title>
<updated>2011-12-12T20:40:16Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-12-12T16:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=15c9a0acc3f7873db4b7d35d016729b2dc229b49'/>
<id>urn:sha1:15c9a0acc3f7873db4b7d35d016729b2dc229b49</id>
<content type='text'>
of_parse_phandle_with_args() needs to return quite a bit of data.  Rather
than making each datum a separate **out_ argument, this patch creates
struct of_phandle_args to contain all the returned data and reworks the
user of the function.  This patch also enables of_parse_phandle_with_args()
to return the device node pointer for the phandle node.

This patch also ends up being fairly major surgery to
of_parse_handle_with_args().  The existing structure didn't work well
when extending to use of_phandle_args, and I discovered bugs during testing.
I also took the opportunity to rename the function to be like the
existing of_parse_phandle().

v2: - moved declaration of of_phandle_args to fix compile on non-DT builds
    - fixed incorrect index in example usage
    - fixed incorrect return code handling for empty entries

Reviewed-by: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/gpio: export of_gpio_simple_xlate</title>
<updated>2011-07-28T22:19:22Z</updated>
<author>
<name>Jamie Iles</name>
<email>jamie@jamieiles.com</email>
</author>
<published>2011-07-28T15:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3038bbdf7404ae3948385cbde30df946579d4e3a'/>
<id>urn:sha1:3038bbdf7404ae3948385cbde30df946579d4e3a</id>
<content type='text'>
Allow GPIO drivers to use of_gpio_simple_xlate.  This is useful for the
generic GPIO driver for example where gpio_chip is embedded in
bgpio_chip and doesn't need of_mm_gpio_chip but has a simple 1:1 GPIO
mapping.

Cc: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/gpio: Add new method for getting gpios under different property names</title>
<updated>2011-06-28T21:39:50Z</updated>
<author>
<name>John Bonesio</name>
<email>bones@secretlab.ca</email>
</author>
<published>2011-06-27T23:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a6b0919140b49e0871584362ae0cf1d18c476058'/>
<id>urn:sha1:a6b0919140b49e0871584362ae0cf1d18c476058</id>
<content type='text'>
This patch adds a new routine, of_get_named_gpio_flags(), which takes the
property name as a parameter rather than assuming "gpios".

of_get_gpio_flags() is modified to call of_get_named_gpio_flags() with "gpios"
as the property parameter.

Signed-off-by: John Bonesio &lt;bones@secretlab.ca&gt;
[grant.likely: Tidied up whitespace and tweaked kerneldoc comments.]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/gpio: add default of_xlate function if device has a node pointer</title>
<updated>2010-07-05T22:14:30Z</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2010-06-08T13:48:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=391c970c0dd1100e3b9e1681f7d0f20aac35455a'/>
<id>urn:sha1:391c970c0dd1100e3b9e1681f7d0f20aac35455a</id>
<content type='text'>
Implement generic OF gpio hooks and thus make device-enabled GPIO chips
(i.e.  the ones that have gpio_chip-&gt;dev specified) automatically attach
to the OpenFirmware subsystem.  Which means that now we can handle I2C and
SPI GPIO chips almost* transparently.

* "Almost" because some chips still require platform data, and for these
  chips OF-glue is still needed, though with this change the glue will
  be much smaller.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Bill Gatliff &lt;bgat@billgatliff.com&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: linux-kernel@vger.kernel.org
CC: devicetree-discuss@lists.ozlabs.org
</content>
</entry>
</feed>
