<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v3.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-01-30T09:29:33Z</updated>
<entry>
<title>gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low</title>
<updated>2015-01-30T09:29:33Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-26T11:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49d2ca84e433dab854c7a866bc6add09cfab682d'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: sysfs: fix memory leak in gpiod_export_link</title>
<updated>2015-01-30T09:28:27Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-26T11:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f303db08df0df9bd0966443ad6001e63960af16'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: mcp23s08: handle default gpio base</title>
<updated>2015-01-26T08:10:44Z</updated>
<author>
<name>Sonic Zhang</name>
<email>sonic.zhang@analog.com</email>
</author>
<published>2015-01-20T09:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b184c388f773f30b6c707d3d4599b2db80f4390c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: omap: Fix bad device access with setup_irq()</title>
<updated>2015-01-26T08:10:44Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2015-01-16T22:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d009c8c61f96b50c068c8122e929352c359f877'/>
<id>urn:sha1: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>
</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:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-01-18T17:03:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b62a9c2058ee4c60677422fb7a8d6129320a4251'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpiolib: of: Correct error handling in of_get_named_gpiod_flags</title>
<updated>2015-01-15T17:31:47Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@intel.com</email>
</author>
<published>2015-01-09T08:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b8792bbdffdff3abda704f89c6a45ea97afdc62'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: sysfs: fix gpio attribute-creation race</title>
<updated>2015-01-15T16:20:56Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-13T12:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: sysfs: fix gpio device-attribute leak</title>
<updated>2015-01-15T16:20:15Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-13T12:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0915e6feb38de8d3601819992a5bd050201a56fa'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gpio: sysfs: fix gpio-chip device-attribute leak</title>
<updated>2015-01-15T16:19:45Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-13T12:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=121b6a79955a3a3fd7bbb9b8cb88d5b9dad6283d'/>
<id>urn:sha1:121b6a79955a3a3fd7bbb9b8cb88d5b9dad6283d</id>
<content type='text'>
The gpio-chip device attributes were never destroyed when the device was
removed.

Fix by using device_create_with_groups() to create the device attributes
of the chip class device.

Note that this also fixes the attribute-creation race with userspace.

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>
</entry>
<entry>
<title>gpio: unregister gpiochip device before removing it</title>
<updated>2015-01-14T13:27:01Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-01-12T16:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01cca93a9491ed95992523ff7e79dd9bfcdea8e0'/>
<id>urn:sha1:01cca93a9491ed95992523ff7e79dd9bfcdea8e0</id>
<content type='text'>
Unregister gpiochip device (used to export information through sysfs)
before removing it internally. This way removal will reverse addition.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
