<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpio, branch v3.19.2</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: tps65912: fix wrong container_of arguments</title>
<updated>2015-03-06T22:57:39+00:00</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nicolassaenzj@gmail.com</email>
</author>
<published>2015-02-19T01:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f165340feeaccfbe2afb1bbacfd1460ebec9b75'/>
<id>3f165340feeaccfbe2afb1bbacfd1460ebec9b75</id>
<content type='text'>
commit 2f97c20e5f7c3582c7310f65a04465bfb0fd0e85 upstream.

The gpio_chip operations receive a pointer the gpio_chip struct which is
contained in the driver's private struct, yet the container_of call in those
functions point to the mfd struct defined in include/linux/mfd/tps65912.h.

Signed-off-by: Nicolas Saenz Julienne &lt;nicolassaenzj@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2f97c20e5f7c3582c7310f65a04465bfb0fd0e85 upstream.

The gpio_chip operations receive a pointer the gpio_chip struct which is
contained in the driver's private struct, yet the container_of call in those
functions point to the mfd struct defined in include/linux/mfd/tps65912.h.

Signed-off-by: Nicolas Saenz Julienne &lt;nicolassaenzj@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node</title>
<updated>2015-03-06T22:57:39+00:00</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@intel.com</email>
</author>
<published>2015-02-10T08:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=83a2ef9a74681002714a2564b79a85a02c3631e8'/>
<id>83a2ef9a74681002714a2564b79a85a02c3631e8</id>
<content type='text'>
commit 9cf75e9e4ddd587ac12e88e8751c358b7b27e95f upstream.

The change:

7b8792bbdffdff3abda704f89c6a45ea97afdc62
gpiolib: of: Correct error handling in of_get_named_gpiod_flags

assumed that only one gpio-chip is registred per of-node.
Some drivers register more than one chip per of-node, so
adjust the matching function of_gpiochip_find_and_xlate to
not stop looking for chips if a node-match is found and
the translation fails.

Fixes: 7b8792bbdffd ("gpiolib: of: Correct error handling in of_get_named_gpiod_flags")
Signed-off-by: Hans Holmberg &lt;hans.holmberg@intel.com&gt;
Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Tested-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Tested-by: Tyler Hall &lt;tylerwhall@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9cf75e9e4ddd587ac12e88e8751c358b7b27e95f upstream.

The change:

7b8792bbdffdff3abda704f89c6a45ea97afdc62
gpiolib: of: Correct error handling in of_get_named_gpiod_flags

assumed that only one gpio-chip is registred per of-node.
Some drivers register more than one chip per of-node, so
adjust the matching function of_gpiochip_find_and_xlate to
not stop looking for chips if a node-match is found and
the translation fails.

Fixes: 7b8792bbdffd ("gpiolib: of: Correct error handling in of_get_named_gpiod_flags")
Signed-off-by: Hans Holmberg &lt;hans.holmberg@intel.com&gt;
Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Tested-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Tested-by: Tyler Hall &lt;tylerwhall@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low</title>
<updated>2015-01-30T09:29:33+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-26T11:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=49d2ca84e433dab854c7a866bc6add09cfab682d'/>
<id>49d2ca84e433dab854c7a866bc6add09cfab682d</id>
<content type='text'>
Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when setting the
gpio-line polarity.

Fixes: 0769746183ca ("gpiolib: add support for changing value polarity
in sysfs")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.33
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when setting the
gpio-line polarity.

Fixes: 0769746183ca ("gpiolib: add support for changing value polarity
in sysfs")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.33
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sysfs: fix memory leak in gpiod_export_link</title>
<updated>2015-01-30T09:28:27+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-26T11:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0f303db08df0df9bd0966443ad6001e63960af16'/>
<id>0f303db08df0df9bd0966443ad6001e63960af16</id>
<content type='text'>
Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when creating a link.

Fixes: a4177ee7f1a8 ("gpiolib: allow exported GPIO nodes to be named
using sysfs links")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.32
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when creating a link.

Fixes: a4177ee7f1a8 ("gpiolib: allow exported GPIO nodes to be named
using sysfs links")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.32
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: mcp23s08: handle default gpio base</title>
<updated>2015-01-26T08:10:44+00:00</updated>
<author>
<name>Sonic Zhang</name>
<email>sonic.zhang@analog.com</email>
</author>
<published>2015-01-20T09:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b184c388f773f30b6c707d3d4599b2db80f4390c'/>
<id>b184c388f773f30b6c707d3d4599b2db80f4390c</id>
<content type='text'>
Create default gpio base if neither device node nor
platform data is defined.

Cc: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sonic Zhang &lt;sonic.zhang@analog.com&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Tested-by: Antonio Fiol &lt;antonio@fiol.es&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create default gpio base if neither device node nor
platform data is defined.

Cc: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sonic Zhang &lt;sonic.zhang@analog.com&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Tested-by: Antonio Fiol &lt;antonio@fiol.es&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: omap: Fix bad device access with setup_irq()</title>
<updated>2015-01-26T08:10:44+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2015-01-16T22:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3d009c8c61f96b50c068c8122e929352c359f877'/>
<id>3d009c8c61f96b50c068c8122e929352c359f877</id>
<content type='text'>
Similar to omap_gpio_irq_type() let's make sure that the GPIO
is usable as an interrupt if the platform init code did not
call gpio_request(). Otherwise we can get invalid device access
after setup_irq():

WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x214/0x340()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Idle): Data Access in Supervisor mode during Functional access
...
[&lt;c05f21e4&gt;] (__irq_svc) from [&lt;c05f1974&gt;] (_raw_spin_unlock_irqrestore+0x34/0x44)
[&lt;c05f1974&gt;] (_raw_spin_unlock_irqrestore) from [&lt;c00914a8&gt;] (__setup_irq+0x244/0x530)
[&lt;c00914a8&gt;] (__setup_irq) from [&lt;c00917d4&gt;] (setup_irq+0x40/0x8c)
[&lt;c00917d4&gt;] (setup_irq) from [&lt;c0039c8c&gt;] (omap_system_dma_probe+0x1d4/0x2b4)
[&lt;c0039c8c&gt;] (omap_system_dma_probe) from [&lt;c03b2200&gt;] (platform_drv_probe+0x44/0xa4)
...

We can fix this the same way omap_gpio_irq_type() is handling it.

Note that the long term solution is to change the gpio-omap driver
to handle the banks as separate driver instances. This will allow
us to rely on just runtime PM for tracking the bank specific state.

Reported-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Cc: Javier Martinez Canillas &lt;javier@dowhile0.org&gt;
Cc: Kevin Hilman &lt;khilman@kernel.org&gt;
Cc: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Tested-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to omap_gpio_irq_type() let's make sure that the GPIO
is usable as an interrupt if the platform init code did not
call gpio_request(). Otherwise we can get invalid device access
after setup_irq():

WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x214/0x340()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Idle): Data Access in Supervisor mode during Functional access
...
[&lt;c05f21e4&gt;] (__irq_svc) from [&lt;c05f1974&gt;] (_raw_spin_unlock_irqrestore+0x34/0x44)
[&lt;c05f1974&gt;] (_raw_spin_unlock_irqrestore) from [&lt;c00914a8&gt;] (__setup_irq+0x244/0x530)
[&lt;c00914a8&gt;] (__setup_irq) from [&lt;c00917d4&gt;] (setup_irq+0x40/0x8c)
[&lt;c00917d4&gt;] (setup_irq) from [&lt;c0039c8c&gt;] (omap_system_dma_probe+0x1d4/0x2b4)
[&lt;c0039c8c&gt;] (omap_system_dma_probe) from [&lt;c03b2200&gt;] (platform_drv_probe+0x44/0xa4)
...

We can fix this the same way omap_gpio_irq_type() is handling it.

Note that the long term solution is to change the gpio-omap driver
to handle the banks as separate driver instances. This will allow
us to rely on just runtime PM for tracking the bank specific state.

Reported-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Cc: Javier Martinez Canillas &lt;javier@dowhile0.org&gt;
Cc: Kevin Hilman &lt;khilman@kernel.org&gt;
Cc: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Tested-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'gpio-v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio</title>
<updated>2015-01-18T17:03:13+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-01-18T17:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b62a9c2058ee4c60677422fb7a8d6129320a4251'/>
<id>b62a9c2058ee4c60677422fb7a8d6129320a4251</id>
<content type='text'>
Pull GPIO fixes from Linus Walleij:
 "Here is a set of fixes that mainly appeared when Johan Hovold started
  exercising the removal path of the GPIO library, dealing with
  hotplugging of GPIO controllers. Details from tag:

  A slew of fixes dealing with some irritating bugs (non-regressions)
  that have been around forever in the GPIO subsystem, most of them also
  tagged for stable:

   - A large slew of fixes from Johan Hovold who is finally testing and
     reviewing the removal path of the GPIO drivers.

   - Fix of_get_named_gpiod_flags() so it works as expected.

   - Fix an IRQ handling bug in the crystalcove driver"

* tag 'gpio-v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpiolib: of: Correct error handling in of_get_named_gpiod_flags
  gpio: sysfs: fix gpio attribute-creation race
  gpio: sysfs: fix gpio device-attribute leak
  gpio: sysfs: fix gpio-chip device-attribute leak
  gpio: unregister gpiochip device before removing it
  gpio: fix sleep-while-atomic in gpiochip_remove
  gpio: fix memory leak and sleep-while-atomic
  gpio: clean up gpiochip_add error handling
  gpio: fix gpio-chip list corruption
  gpio: fix memory and reference leaks in gpiochip_add error path
  gpio: crystalcove: use handle_nested_irq
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull GPIO fixes from Linus Walleij:
 "Here is a set of fixes that mainly appeared when Johan Hovold started
  exercising the removal path of the GPIO library, dealing with
  hotplugging of GPIO controllers. Details from tag:

  A slew of fixes dealing with some irritating bugs (non-regressions)
  that have been around forever in the GPIO subsystem, most of them also
  tagged for stable:

   - A large slew of fixes from Johan Hovold who is finally testing and
     reviewing the removal path of the GPIO drivers.

   - Fix of_get_named_gpiod_flags() so it works as expected.

   - Fix an IRQ handling bug in the crystalcove driver"

* tag 'gpio-v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpiolib: of: Correct error handling in of_get_named_gpiod_flags
  gpio: sysfs: fix gpio attribute-creation race
  gpio: sysfs: fix gpio device-attribute leak
  gpio: sysfs: fix gpio-chip device-attribute leak
  gpio: unregister gpiochip device before removing it
  gpio: fix sleep-while-atomic in gpiochip_remove
  gpio: fix memory leak and sleep-while-atomic
  gpio: clean up gpiochip_add error handling
  gpio: fix gpio-chip list corruption
  gpio: fix memory and reference leaks in gpiochip_add error path
  gpio: crystalcove: use handle_nested_irq
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: of: Correct error handling in of_get_named_gpiod_flags</title>
<updated>2015-01-15T17:31:47+00:00</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@intel.com</email>
</author>
<published>2015-01-09T08:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b8792bbdffdff3abda704f89c6a45ea97afdc62'/>
<id>7b8792bbdffdff3abda704f89c6a45ea97afdc62</id>
<content type='text'>
of_get_named_gpiod_flags fails with -EPROBE_DEFER in cases
where the gpio chip is available and the GPIO translation fails.

This causes drivers to be re-probed erroneusly, and hides the
real problem(i.e. the GPIO number being out of range).

Cc: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@intel.com&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of_get_named_gpiod_flags fails with -EPROBE_DEFER in cases
where the gpio chip is available and the GPIO translation fails.

This causes drivers to be re-probed erroneusly, and hides the
real problem(i.e. the GPIO number being out of range).

Cc: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@intel.com&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sysfs: fix gpio attribute-creation race</title>
<updated>2015-01-15T16:20:56+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-13T12:00:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f'/>
<id>ebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f</id>
<content type='text'>
Fix attribute-creation race with userspace by using the default group
to create also the contingent gpio device attributes.

Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix attribute-creation race with userspace by using the default group
to create also the contingent gpio device attributes.

Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sysfs: fix gpio device-attribute leak</title>
<updated>2015-01-15T16:20:15+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-13T12:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0915e6feb38de8d3601819992a5bd050201a56fa'/>
<id>0915e6feb38de8d3601819992a5bd050201a56fa</id>
<content type='text'>
The gpio device attributes were never destroyed when the gpio was
unexported (or on export failures).

Use device_create_with_groups() to create the default device attributes
of the gpio class device. Note that this also fixes the
attribute-creation race with userspace for these attributes.

Remove contingent attributes in export error path and on unexport.

Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.27+
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The gpio device attributes were never destroyed when the gpio was
unexported (or on export failures).

Use device_create_with_groups() to create the default device attributes
of the gpio class device. Note that this also fixes the
attribute-creation race with userspace for these attributes.

Remove contingent attributes in export error path and on unexport.

Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.27+
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
