<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/of/gpio.c, branch linux-3.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>gpio: Fix range check in of_gpio_simple_xlate()</title>
<updated>2012-04-10T20:20:56+00:00</updated>
<author>
<name>Roland Stigge</name>
<email>stigge@antcom.de</email>
</author>
<published>2012-04-04T00:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6270d830d030da48eddffbe31ed1e4444f203fc5'/>
<id>6270d830d030da48eddffbe31ed1e4444f203fc5</id>
<content type='text'>
of_gpio_simple_xlate() has an off-by-one bug where it checks to see if
args[0] is &gt; ngpio instead of &gt;=.  args[0] must always be less than
ngpio because it is a zero-based enumeration.

Signed-off-by: Roland Stigge &lt;stigge@antcom.de&gt;
[grant.likely: beef up commit text]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of_gpio_simple_xlate() has an off-by-one bug where it checks to see if
args[0] is &gt; ngpio instead of &gt;=.  args[0] must always be less than
ngpio because it is a zero-based enumeration.

Signed-off-by: Roland Stigge &lt;stigge@antcom.de&gt;
[grant.likely: beef up commit text]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: constify the data parameter to gpiochip_find()</title>
<updated>2012-03-02T22:56:03+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-03-02T22:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6e2cf6514066cdd5a0844b34760029a5a4870318'/>
<id>6e2cf6514066cdd5a0844b34760029a5a4870318</id>
<content type='text'>
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

</pre>
</div>
</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:30+00:00</updated>
<author>
<name>Jean-Christophe PLAGNIOL-VILLARD</name>
<email>plagnioj@jcrosoft.com</email>
</author>
<published>2012-02-02T15:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff64abefb6680dfc2aca7ecaa5e695949e7335c9'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: create of_phandle_args to simplify return of phandle parsing data</title>
<updated>2011-12-12T20:40:16+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-12-12T16:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=15c9a0acc3f7873db4b7d35d016729b2dc229b49'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: output basic details and consolidate gpio device drivers</title>
<updated>2011-12-12T20:40:16+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-11-06T18:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=64842aad5ec5ea3b6f6e716ce53a863f7c409da8'/>
<id>64842aad5ec5ea3b6f6e716ce53a863f7c409da8</id>
<content type='text'>
This patch adds a kernel message, containing GPIO range and device
name on successful device registration, and removes duplicate messages from the following drivers:
	* gpio-adp5588
	* gpio-bt8xx
	* gpio-cs5535
	* gpio-janz-ttl
	* gpio-nomadik
	* gpio-pcf857x
	* gpio-xilinx
	* drivers/of/gpio.c

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a kernel message, containing GPIO range and device
name on successful device registration, and removes duplicate messages from the following drivers:
	* gpio-adp5588
	* gpio-bt8xx
	* gpio-cs5535
	* gpio-janz-ttl
	* gpio-nomadik
	* gpio-pcf857x
	* gpio-xilinx
	* drivers/of/gpio.c

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/gpio: export of_gpio_simple_xlate</title>
<updated>2011-07-28T22:19:22+00:00</updated>
<author>
<name>Jamie Iles</name>
<email>jamie@jamieiles.com</email>
</author>
<published>2011-07-28T15:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3038bbdf7404ae3948385cbde30df946579d4e3a'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/gpio: Add new method for getting gpios under different property names</title>
<updated>2011-06-28T21:39:50+00:00</updated>
<author>
<name>John Bonesio</name>
<email>bones@secretlab.ca</email>
</author>
<published>2011-06-27T23:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a6b0919140b49e0871584362ae0cf1d18c476058'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/gpio: fix of_gpio includes</title>
<updated>2010-07-05T22:14:44+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-07-05T22:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2e13cba8dc35774bf1d7169733e876c5b7adee54'/>
<id>2e13cba8dc35774bf1d7169733e876c5b7adee54</id>
<content type='text'>
drivers/of/gpio.c is missing includes for of_irq and struct device which
cause build failures on ARM.  This patch adds the correct include files
and removes the unneeded kernel.h include

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/of/gpio.c is missing includes for of_irq and struct device which
cause build failures on ARM.  This patch adds the correct include files
and removes the unneeded kernel.h include

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/gpio: add default of_xlate function if device has a node pointer</title>
<updated>2010-07-05T22:14:30+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2010-06-08T13:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=391c970c0dd1100e3b9e1681f7d0f20aac35455a'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>of/gpio: stop using device_node data pointer to find gpio_chip</title>
<updated>2010-07-05T22:14:30+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=594fa265e084073443390c5b93d5410fd28e9bcd'/>
<id>594fa265e084073443390c5b93d5410fd28e9bcd</id>
<content type='text'>
Currently the kernel uses the struct device_node.data pointer to resolve
a struct gpio_chip pointer from a device tree node.  However, the .data
member doesn't provide any type checking and there aren't any rules
enforced on what it should be used for.  There's no guarantee that the
data stored in it actually points to an gpio_chip pointer.

Instead of relying on the .data pointer, this patch modifies the code
to add a lookup function which scans through the registered gpio_chips
and returns the gpio_chip that has a pointer to the specified
device_node.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
CC: 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: linux-kernel@vger.kernel.org
CC: devicetree-discuss@lists.ozlabs.org

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the kernel uses the struct device_node.data pointer to resolve
a struct gpio_chip pointer from a device tree node.  However, the .data
member doesn't provide any type checking and there aren't any rules
enforced on what it should be used for.  There's no guarantee that the
data stored in it actually points to an gpio_chip pointer.

Instead of relying on the .data pointer, this patch modifies the code
to add a lookup function which scans through the registered gpio_chips
and returns the gpio_chip that has a pointer to the specified
device_node.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
CC: 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: linux-kernel@vger.kernel.org
CC: devicetree-discuss@lists.ozlabs.org

</pre>
</div>
</content>
</entry>
</feed>
