<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v4.7</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=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-22T13:29:32Z</updated>
<entry>
<title>gpio: tegra: don't auto-enable for COMPILE_TEST</title>
<updated>2016-07-22T13:29:32Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-07-06T12:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0bfb85c6ba620c39c0e5124851a1bea0f5a56e05'/>
<id>urn:sha1:0bfb85c6ba620c39c0e5124851a1bea0f5a56e05</id>
<content type='text'>
I stumbled over a build error with COMPILE_TEST and CONFIG_OF
disabled:

drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'

The problem is that the newly added GPIO_TEGRA Kconfig symbol
does not have a dependency on CONFIG_OF. However, there is another
problem here as the driver gets enabled unconditionally whenever
COMPILE_TEST is set.

This fixes both problems, by making the symbol user-visible
when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.

As a side-effect, it is now possible to compile-test a Tegra
kernel with GPIO support disabled, which is harmless.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test")
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "gpio: gpiolib-of: Allow compile testing"</title>
<updated>2016-07-05T17:03:04Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-07-05T06:46:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92c74bceb0dd4b74a6c0b56c2f9a5c93a0860808'/>
<id>urn:sha1:92c74bceb0dd4b74a6c0b56c2f9a5c93a0860808</id>
<content type='text'>
This reverts commit 1e4a80640338924b9f9fd7a121ac31d08134410a.

This creates more problems than it solves right now. Compile
testing needs to go in with patches fixing the problems it
uncovers.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "gpiolib: Split GPIO flags parsing and GPIO configuration"</title>
<updated>2016-07-04T14:51:29Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-07-03T16:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=85b03b3033fd4eba82665b3b9902c095a08cc52f'/>
<id>urn:sha1:85b03b3033fd4eba82665b3b9902c095a08cc52f</id>
<content type='text'>
This reverts commit 923b93e451db876d1479d3e4458fce14fec31d1c.

Make sure consumers do not overwrite gpio flags for pins that have
already been claimed.

While adding support for gpio drivers to refuse a request using
unsupported flags, the order of when the requested flag was checked and
the new flags were applied was reversed to that consumers could
overwrite flags for already requested gpios.

This not only affects device-tree setups where two drivers could request
the same gpio using conflicting configurations, but also allowed user
space to clear gpio flags for already claimed pins simply by attempting
to export them through the sysfs interface. By for example clearing the
FLAG_ACTIVE_LOW flag this way, user space could effectively change the
polarity of a signal.

Reverting this change obviously prevents gpio drivers from doing sanity
checks on the flags in their request callbacks. Fortunately only one
recently added driver (gpio-tps65218 in v4.6) appears to do this, and a
follow up patch could restore this functionality through a different
interface.

Cc: stable &lt;stable@vger.kernel.org&gt;	# 4.4
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: sch: Fix Oops on module load on Asus Eee PC 1201</title>
<updated>2016-07-04T14:50:40Z</updated>
<author>
<name>Colin Pitrat</name>
<email>colin.pitrat@gmail.com</email>
</author>
<published>2016-06-18T18:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87041a58d3b19455d39baed2a5e5bb43b58fb915'/>
<id>urn:sha1:87041a58d3b19455d39baed2a5e5bb43b58fb915</id>
<content type='text'>
This fixes the issue descirbe in bug 117531
(https://bugzilla.kernel.org/show_bug.cgi?id=117531).
It's a regression introduced in linux 4.5 that causes a Oops at load of
gpio_sch and prevents powering off the computer.

The issue is that sch_gpio_reg_set is called in sch_gpio_probe before
gpio_chip data is initialized with the pointer to the sch_gpio struct. As
sch_gpio_reg_set calls gpiochip_get_data, it returns NULL which causes
the Oops.

The patch follows Mika's advice (https://lkml.org/lkml/2016/5/9/61) and
consists in modifying sch_gpio_reg_get and sch_gpio_reg_set to take a
sch_gpio struct directly instead of a gpio_chip, which avoids the call to
gpiochip_get_data.

Thanks Mika for your patience with me :-)

Cc: stable@vger.kernel.org
Signed-off-by: Colin Pitrat &lt;colin.pitrat@gmail.com&gt;
Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pinctrl-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl</title>
<updated>2016-06-29T17:05:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-06-29T17:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00bf377d19ad3d80cbc7a036521279a86e397bfb'/>
<id>urn:sha1:00bf377d19ad3d80cbc7a036521279a86e397bfb</id>
<content type='text'>
Pull pin control fixes from Linus Walleij:
 "Here are a bunch of fixes for pin control.  Just drivers and a
  MAINTAINERS fixup:

   - Driver fixes for i.MX, single register, Tegra and BayTrail.

   - MAINTAINERS entry for the documentation"

* tag 'pinctrl-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: baytrail: Fix mingled clock pins
  MAINTAINERS: belong Documentation/pinctrl.txt properly
  pinctrl: tegra: Fix build dependency
  gpio: tegra: Make lockdep class file-scoped
  pinctrl: single: Fix missing flush of posted write for a wakeirq
  pinctrl: imx: Do not treat a PIN without MUX register as an error
</content>
</entry>
<entry>
<title>Merge tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio</title>
<updated>2016-06-22T17:13:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-06-22T17:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=144b5ae3e343f193a6a7edef8f30aab4fad2d12b'/>
<id>urn:sha1:144b5ae3e343f193a6a7edef8f30aab4fad2d12b</id>
<content type='text'>
Pull GPIO fixes from Linus Walleij:
 "More GPIO fixes.  Most prominent the gpiod_to_irq() fix brought to my
  attention by Hans de Goede.  The hardening patch is a consequence of
  the reasoning around that bug.

   - It was discovered that too many parts of the kernel does not
     respect gpiod_to_irq() returning zero for an invalid IRQ.  While
     this gets fixed, we need to make it return negative errorcodes
     again.

   - Harden the library a bit when passed error pointers.  It is a bug
     to use these, but let's be helpful and warn the users.

   - Fix an uninitialized spinlock in the 104-idi-48 driver"

* tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: make library immune to error pointers
  gpio: make sure gpiod_to_irq() returns negative on NULL desc
  gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock
</content>
</entry>
<entry>
<title>gpio: tegra: Make lockdep class file-scoped</title>
<updated>2016-06-22T15:58:07Z</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2016-06-06T16:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ee8ff4867d07a6429991a0b748fa9c1586a7764'/>
<id>urn:sha1:9ee8ff4867d07a6429991a0b748fa9c1586a7764</id>
<content type='text'>
Commit b546be0db955 ("gpio: tegra: Get rid of all file scoped global
variables") moved all file scoped variables into the driver-private
structure to allow potentially multiple instances of the driver. The
change also included turning the lockdep class into a driver-private
field, which doesn't work and produces error messages such as this:

	[    0.142310] BUG: key ffff8000fb3f7ab0 not in .data!

Make the lockdep class file-scoped again to fix this issue.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: Allow PC/104 devices on X86_64</title>
<updated>2016-06-18T03:21:12Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>vilhelm.gray@gmail.com</email>
</author>
<published>2016-05-27T22:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4ae916912b4969916ebb275995c745b01cb432c'/>
<id>urn:sha1:f4ae916912b4969916ebb275995c745b01cb432c</id>
<content type='text'>
With the introduction of the ISA_BUS_API Kconfig option, ISA-style
drivers may be built for X86_64 architectures. This patch changes the
ISA Kconfig option dependency of the PC/104 drivers to ISA_BUS_API, thus
allowing them to build for X86_64 as they are expected to.

Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gpio: make library immune to error pointers</title>
<updated>2016-06-17T16:12:19Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-06-16T09:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bfbbe44daf64d0ccf2de123179817f3557fb9237'/>
<id>urn:sha1:bfbbe44daf64d0ccf2de123179817f3557fb9237</id>
<content type='text'>
Most functions that take a GPIO descriptor in need to check the
descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC()
macro except for the gpiod_to_irq() function which needs special
handling.

Cc: stable@vger.kernel.org
Reported-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Reviewed-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Acked-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 sure gpiod_to_irq() returns negative on NULL desc</title>
<updated>2016-06-17T16:12:07Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-06-15T20:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79bb71bd1d93197ce227fa167b450b633f30a52b'/>
<id>urn:sha1:79bb71bd1d93197ce227fa167b450b633f30a52b</id>
<content type='text'>
commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264
("gpio: bail out silently on NULL descriptors")
doesn't work for gpiod_to_irq(): drivers assume that NULL
descriptors will give negative IRQ numbers in return.

It has been pointed out that returning 0 is NO_IRQ and that
drivers should be amended to treat this as an error, but that
is for the longer term: now let us repair the semantics.

Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
