<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpio, branch v4.4.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-12-17T14:48:29Z</updated>
<entry>
<title>gpio: revert get() to non-errorprogating behaviour</title>
<updated>2015-12-17T14:48:29Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-12-17T09:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45ad7db90b42555c8107f18ec6d6a1e9bce34860'/>
<id>urn:sha1:45ad7db90b42555c8107f18ec6d6a1e9bce34860</id>
<content type='text'>
commit e20538b82f1f
("gpio: Propagate errors from chip-&gt;get()")
started to propagate errors from the .get() functions since
we can get errors from the infrastructure of e.g. slowbus
GPIO expanders.

However it turns out a bunch of drivers relied on the core
to clamp the value, so we need to revert to the old behaviour
and go over all drivers and fix them to conform to the
expectations of the core before we go back to propagating
the error code.

Cc: stable@vger.kernel.org # 4.3+
Cc: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Cc: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Fixes: e20538b82f1f ("gpio: Propagate errors from chip-&gt;get()")
Reported-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: clamp values from bgpio_get_set()</title>
<updated>2015-12-17T14:47:38Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-12-10T14:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=67a76aafec00db46fbd65d7d17a1cde1adde70c5'/>
<id>urn:sha1:67a76aafec00db46fbd65d7d17a1cde1adde70c5</id>
<content type='text'>
The bgpio_get_set() call should return a value clamped to [0,1],
the current code will return a negative value if reading
bit 31, which turns the value negative as this is a signed value
and thus gets interpreted as an error by the gpiolib core.
Found on the gpio-mxc but applies to any MMIO driver.

Cc: stable@vger.kernel.org # 4.3+
Cc: kernel@pengutronix.de
Cc: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Fixes:  e20538b82f1f ("gpio: Propagate errors from chip-&gt;get()")
Reported-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register</title>
<updated>2015-12-11T18:12:57Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-12-08T15:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a57e741621eb759ba9d1743bed6a3ccf5472d10'/>
<id>urn:sha1:3a57e741621eb759ba9d1743bed6a3ccf5472d10</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Alban Bedel &lt;albeu@free.fr&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks</title>
<updated>2015-11-30T12:50:21Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2015-11-20T13:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=000255b7dfc3119c13f388f179d6fc19cd00eada'/>
<id>urn:sha1:000255b7dfc3119c13f388f179d6fc19cd00eada</id>
<content type='text'>
Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq
chip, but after set of reworks Generic irq chip code was replaced by
common OMAP GPIO implementation and finally removed by
commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").
Unfortunately, above commit left .irq_mask/unmask callbacks assigned
as below for MPUIO GPIO case:
	irqc-&gt;irq_mask = irq_gc_mask_set_bit;
	irqc-&gt;irq_unmask = irq_gc_mask_clr_bit;

This now causes boot failure on OMAP1 platforms, after
commit 450fa54cfd66 ("gpio: omap: convert to use generic irq handler")
which forces these callbacks to be called during GPIO IRQs mapping
from gpiochip_irq_map:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 75 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc1-e3-los_afe0c+-00002-g25379c0-dirty #1
Hardware name: Amstrad E3 (Delta)
task: c1836000 ti: c1838000 task.ti: c1838000
PC is at irq_gc_mask_set_bit+0x1c/0x60
LR is at __irq_do_set_handler+0x118/0x15c
pc : [&lt;c004848c&gt;]    lr : [&lt;c0047d4c&gt;]    psr: 600000d3
sp : c1839c90  ip : c1862c64  fp : c1839c9c
r10: 00000000  r9 : c0411950  r8 : c0411bbc
r7 : 00000000  r6 : c185c310  r5 : c00444e8  r4 : c185c300
r3 : c1854b50  r2 : 00000000  r1 : 00000000  r0 : c185c310
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000317f  Table: 10004000  DAC: 00000057
Process swapper (pid: 1, stack limit = 0xc1838190)
Stack: (0xc1839c90 to 0xc183a000)

[...]

Backtrace:
[&lt;c0048470&gt;] (irq_gc_mask_set_bit) from [&lt;c0047d4c&gt;] (__irq_do_set_handler+0x118/0x15c)
[&lt;c0047c34&gt;] (__irq_do_set_handler) from [&lt;c0047dd4&gt;] (__irq_set_handler+0x44/0x5c)
 r6:00000000 r5:c00444e8 r4:c185c300
[&lt;c0047d90&gt;] (__irq_set_handler) from [&lt;c0047e1c&gt;] (irq_set_chip_and_handler_name+0x30/0x34)
 r7:00000050 r6:00000000 r5:c00444e8 r4:00000050
[&lt;c0047dec&gt;] (irq_set_chip_and_handler_name) from [&lt;c01b345c&gt;] (gpiochip_irq_map+0x3c/0x8c)
 r7:00000050 r6:00000000 r5:00000050 r4:c1862c64
[&lt;c01b3420&gt;] (gpiochip_irq_map) from [&lt;c0049670&gt;] (irq_domain_associate+0x7c/0x1c4)
 r5:c185c310 r4:c185cb00
[&lt;c00495f4&gt;] (irq_domain_associate) from [&lt;c0049894&gt;] (irq_domain_add_simple+0x98/0xc0)
 r8:c0411bbc r7:c185cb00 r6:00000050 r5:00000010 r4:00000001
[&lt;c00497fc&gt;] (irq_domain_add_simple) from [&lt;c01b3328&gt;] (_gpiochip_irqchip_add+0x64/0x10c)
 r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50
[&lt;c01b32c4&gt;] (_gpiochip_irqchip_add) from [&lt;c01b79f4&gt;] (omap_gpio_probe+0x2fc/0x63c)
 r5:c1854b50 r4:c1862c10
[&lt;c01b76f8&gt;] (omap_gpio_probe) from [&lt;c01fcf58&gt;] (platform_drv_probe+0x2c/0x64)
 r10:00000000 r9:c03e45e8 r8:00000000 r7:c0419294 r6:c0411984 r5:c0419294
 r4:c0411950
[&lt;c01fcf2c&gt;] (platform_drv_probe) from [&lt;c01fb668&gt;] (really_probe+0x160/0x29c)

Hence, fix it by remove obsolete callbacks assignment. After this
change 	omap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used
for MPUIO IRQs masking, but this now happens anyway from
omap_gpio_irq_startup/shutdown().

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Fixes: commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts")
Reported-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Acked-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: fix oops, if gpio name is NULL</title>
<updated>2015-11-29T21:17:40Z</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2015-11-11T12:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d06165b329c04c8050c4b744c05ec61046709490'/>
<id>urn:sha1:d06165b329c04c8050c4b744c05ec61046709490</id>
<content type='text'>
Commit c0017ed71966 ("gpio: Introduce gpio descriptor 'name'") causes
OOPS on boot on LPC32xx boards:

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.0+ #707
    Hardware name: LPC32XX SoC (Flattened Device Tree)
    task: c381baa0 ti: c381e000 task.ti: c381e000
    PC is at strcmp+0x10/0x40
    LR is at gpiochip_add+0x3d0/0x4d4
    pc : [&lt;&gt;]    lr : [&lt;&gt;]    psr: a0000093
    sp : c381fd60  ip : c381fd70  fp : c381fd6c

    [snip]

    Backtrace:
    [&lt;&gt;] (strcmp) from [&lt;&gt;] (gpiochip_add+0x3d0/0x4d4)
    [&lt;&gt;] (gpiochip_add) from [&lt;&gt;] (lpc32xx_gpio_probe+0x44/0x60)
    [&lt;&gt;] (lpc32xx_gpio_probe) from [&lt;&gt;] (platform_drv_probe+0x40/0x8c)
    [&lt;&gt;] (platform_drv_probe) from [&lt;&gt;] (driver_probe_device+0x110/0x294)
    [&lt;&gt;] (driver_probe_device) from [&lt;&gt;] (__driver_attach+0x70/0x94)
    [&lt;&gt;] (__driver_attach) from [&lt;&gt;] (bus_for_each_dev+0x74/0x98)
    [&lt;&gt;] (bus_for_each_dev) from [&lt;&gt;] (driver_attach+0x20/0x28)
    [&lt;&gt;] (driver_attach) from [&lt;&gt;] (bus_add_driver+0xd4/0x1f0)
    [&lt;&gt;] (bus_add_driver) from [&lt;&gt;] (driver_register+0xa4/0xe8)
    [&lt;&gt;] (driver_register) from [&lt;&gt;] (__platform_driver_register+0x38/0x4c)
    [&lt;&gt;] (__platform_driver_register) from [&lt;&gt;] (lpc32xx_gpio_driver_init+0x18/0x20)
    [&lt;&gt;] (lpc32xx_gpio_driver_init) from [&lt;&gt;] (do_one_initcall+0x108/0x1c8)
    [&lt;&gt;] (do_one_initcall) from [&lt;&gt;] (kernel_init_freeable+0x10c/0x1d4)
    [&lt;&gt;] (kernel_init_freeable) from [&lt;&gt;] (kernel_init+0x10/0xec)
    [&lt;&gt;] (kernel_init) from [&lt;&gt;] (ret_from_fork+0x14/0x24)

This is caused by the fact that at the moment some GPIO names are set
to NULL, there is a hole in linear representation of one GPI bank, see
drivers/gpio/gpio-lpc32xx.c / gpi_p3_names[] for details.

The same problem most probably affects also gpio-cs5535.c, see
cs5535_gpio_names[].

Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio-tegra: Do not create the debugfs entry by default</title>
<updated>2015-11-17T14:18:51Z</updated>
<author>
<name>Suzuki K. Poulose</name>
<email>suzuki.poulose@arm.com</email>
</author>
<published>2015-11-16T16:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b59d5fb7e9c7b145eae1119af04b7c450efaa11b'/>
<id>urn:sha1:b59d5fb7e9c7b145eae1119af04b7c450efaa11b</id>
<content type='text'>
The tegra gpio driver creates the debugfs entry irrespective of
whether the device exists or not. This is enabled on an arm64_defconfig
and leaves an entry in debugfs on all platforms where it is not
useful. This patch fixes the issue by creating the entry only when
a device exists.

Signed-off-by: Suzuki K. Poulose &lt;suzuki.poulose@arm.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: palmas: fix a possible NULL dereference</title>
<updated>2015-11-17T13:40:24Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-11-11T20:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5664de25fa8ad2f06d6d7dd44df61023e1aaaa14'/>
<id>urn:sha1:5664de25fa8ad2f06d6d7dd44df61023e1aaaa14</id>
<content type='text'>
of_match_device could return NULL, and so cause a NULL pointer
dereference later.

Reported-by: coverity (CID 1130700)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: syscon: fix a possible NULL dereference</title>
<updated>2015-11-17T13:39:22Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-11-11T20:27:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=853f0cb8603486a8ba17d5b728b52a9b4b029698'/>
<id>urn:sha1:853f0cb8603486a8ba17d5b728b52a9b4b029698</id>
<content type='text'>
of_match_device could return NULL, and so cause a NULL pointer
dereference later at line 199:
priv-&gt;flags = of_id-&gt;data;

Reported-by: coverity (CID 1324140)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: 74xx: fix a possible NULL dereference</title>
<updated>2015-11-17T13:39:17Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-11-11T20:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56880a243c85668762dfec69b878862f86be6f04'/>
<id>urn:sha1:56880a243c85668762dfec69b878862f86be6f04</id>
<content type='text'>
of_match_device could return NULL, and so cause a NULL pointer
dereference later at line 132:
priv-&gt;flags = (uintptr_t) of_id-&gt;data;

Reported-by: coverity (CID 1324141)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic</title>
<updated>2015-11-06T22:22:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-06T22:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9cf5c095b65da63c08b928a7d0015d5d5dca8a66'/>
<id>urn:sha1:9cf5c095b65da63c08b928a7d0015d5d5dca8a66</id>
<content type='text'>
Pull asm-generic cleanups from Arnd Bergmann:
 "The asm-generic changes for 4.4 are mostly a series from Christoph
  Hellwig to clean up various abuses of headers in there.  The patch to
  rename the io-64-nonatomic-*.h headers caused some conflicts with new
  users, so I added a workaround that we can remove in the next merge
  window.

  The only other patch is a warning fix from Marek Vasut"

* tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  asm-generic: temporarily add back asm-generic/io-64-nonatomic*.h
  asm-generic: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations
  gpio-mxc: stop including &lt;asm-generic/bug&gt;
  n_tracesink: stop including &lt;asm-generic/bug&gt;
  n_tracerouter: stop including &lt;asm-generic/bug&gt;
  mlx5: stop including &lt;asm-generic/kmap_types.h&gt;
  hifn_795x: stop including &lt;asm-generic/kmap_types.h&gt;
  drbd: stop including &lt;asm-generic/kmap_types.h&gt;
  move count_zeroes.h out of asm-generic
  move io-64-nonatomic*.h out of asm-generic
</content>
</entry>
</feed>
