<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/gpio/driver.h, branch v4.3.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.3.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.3.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2015-08-26T07:29:50+00:00</updated>
<entry>
<title>gpiolib: add description for gpio irqchip fields in struct gpio_chip</title>
<updated>2015-08-26T07:29:50+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2015-08-17T12:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41d6bb4c890c8db01248b1bdd512a18e7bd29ca3'/>
<id>urn:sha1:41d6bb4c890c8db01248b1bdd512a18e7bd29ca3</id>
<content type='text'>
Add missed description for GPIO irqchip fields in struct gpio_chip.

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: irqchip: use different lockdep class for each gpio irqchip</title>
<updated>2015-08-17T13:32:03+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2015-08-17T12:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0a8bcf4670c2c696e6e83742539a5e0dd7a62d6'/>
<id>urn:sha1:a0a8bcf4670c2c696e6e83742539a5e0dd7a62d6</id>
<content type='text'>
Since IRQ chip helpers were introduced drivers lose ability to
register separate lockdep classes for each registered GPIO IRQ
chip and the gpiolib now is using shared lockdep class for
all GPIO IRQ chips (gpiochip_irq_lock_class).
As result, lockdep will produce warning when there are min two
stacked GPIO chips and all of them are interrupt controllers.

HW configuration which generates lockdep warning (TI dra7-evm):

[SOC GPIO bankA.gpioX]
  &lt;- irq - [pcf875x.gpioY]
            &lt;- irq - DevZ.enable_irq_wake(pcf_gpioY_irq);
The issue was reported in [1] and discussed [2].

=============================================
[ INFO: possible recursive locking detected ]
4.2.0-rc6-00013-g5d050ed-dirty #55 Not tainted
---------------------------------------------
sh/63 is trying to acquire lock:
 (class){......}, at: [&lt;c009b91c&gt;] __irq_get_desc_lock+0x50/0x94

but task is already holding lock:
 (class){......}, at: [&lt;c009b91c&gt;] __irq_get_desc_lock+0x50/0x94

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(class);
  lock(class);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

7 locks held by sh/63:
 #0:  (sb_writers#4){.+.+.+}, at: [&lt;c016bbb8&gt;] vfs_write+0x13c/0x164
 #1:  (&amp;of-&gt;mutex){+.+.+.}, at: [&lt;c01debf4&gt;] kernfs_fop_write+0x4c/0x1a0
 #2:  (s_active#36){.+.+.+}, at: [&lt;c01debfc&gt;] kernfs_fop_write+0x54/0x1a0
 #3:  (pm_mutex){+.+.+.}, at: [&lt;c009758c&gt;] pm_suspend+0xec/0x4c4
 #4:  (&amp;dev-&gt;mutex){......}, at: [&lt;c03f77f8&gt;] __device_suspend+0xd4/0x398
 #5:  (&amp;gpio-&gt;lock){+.+.+.}, at: [&lt;c009b940&gt;] __irq_get_desc_lock+0x74/0x94
 #6:  (class){......}, at: [&lt;c009b91c&gt;] __irq_get_desc_lock+0x50/0x94

stack backtrace:
CPU: 0 PID: 63 Comm: sh Not tainted 4.2.0-rc6-00013-g5d050ed-dirty #55
Hardware name: Generic DRA74X (Flattened Device Tree)
[&lt;c0016e24&gt;] (unwind_backtrace) from [&lt;c0013338&gt;] (show_stack+0x10/0x14)
[&lt;c0013338&gt;] (show_stack) from [&lt;c05f6b24&gt;] (dump_stack+0x84/0x9c)
[&lt;c05f6b24&gt;] (dump_stack) from [&lt;c00903f4&gt;] (__lock_acquire+0x19c0/0x1e20)
[&lt;c00903f4&gt;] (__lock_acquire) from [&lt;c0091098&gt;] (lock_acquire+0xa8/0x128)
[&lt;c0091098&gt;] (lock_acquire) from [&lt;c05fd61c&gt;] (_raw_spin_lock_irqsave+0x38/0x4c)
[&lt;c05fd61c&gt;] (_raw_spin_lock_irqsave) from [&lt;c009b91c&gt;] (__irq_get_desc_lock+0x50/0x94)
[&lt;c009b91c&gt;] (__irq_get_desc_lock) from [&lt;c009c4f4&gt;] (irq_set_irq_wake+0x20/0xfc)
[&lt;c009c4f4&gt;] (irq_set_irq_wake) from [&lt;c0393ac4&gt;] (pcf857x_irq_set_wake+0x24/0x54)
[&lt;c0393ac4&gt;] (pcf857x_irq_set_wake) from [&lt;c009c560&gt;] (irq_set_irq_wake+0x8c/0xfc)
[&lt;c009c560&gt;] (irq_set_irq_wake) from [&lt;c04a02ac&gt;] (gpio_keys_suspend+0x70/0xd4)
[&lt;c04a02ac&gt;] (gpio_keys_suspend) from [&lt;c03f6a00&gt;] (dpm_run_callback+0x50/0x124)
[&lt;c03f6a00&gt;] (dpm_run_callback) from [&lt;c03f7830&gt;] (__device_suspend+0x10c/0x398)
[&lt;c03f7830&gt;] (__device_suspend) from [&lt;c03f90f0&gt;] (dpm_suspend+0x134/0x2f4)
[&lt;c03f90f0&gt;] (dpm_suspend) from [&lt;c0096e20&gt;] (suspend_devices_and_enter+0xa8/0x728)
[&lt;c0096e20&gt;] (suspend_devices_and_enter) from [&lt;c00977cc&gt;] (pm_suspend+0x32c/0x4c4)
[&lt;c00977cc&gt;] (pm_suspend) from [&lt;c0096060&gt;] (state_store+0x64/0xb8)
[&lt;c0096060&gt;] (state_store) from [&lt;c01dec64&gt;] (kernfs_fop_write+0xbc/0x1a0)
[&lt;c01dec64&gt;] (kernfs_fop_write) from [&lt;c016b280&gt;] (__vfs_write+0x20/0xd8)
[&lt;c016b280&gt;] (__vfs_write) from [&lt;c016bb0c&gt;] (vfs_write+0x90/0x164)
[&lt;c016bb0c&gt;] (vfs_write) from [&lt;c016c330&gt;] (SyS_write+0x44/0x9c)
[&lt;c016c330&gt;] (SyS_write) from [&lt;c000f500&gt;] (ret_fast_syscall+0x0/0x54)

Lets fix it by using separate lockdep class for each registered GPIO
IRQ Chip. This is done by wrapping gpiochip_irqchip_add call into macros.

The implementation of this patch inspired by solution done by Nicolas
Boichat for regmap [3]

[1] http://www.spinics.net/lists/linux-gpio/msg05844.html
[2] http://www.spinics.net/lists/linux-gpio/msg06021.html
[3] http://www.spinics.net/lists/arm-kernel/msg429834.html

Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Reported-by: Roger Quadros &lt;rogerq@ti.com&gt;
Tested-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: Remove double "base" in comment</title>
<updated>2015-07-15T22:12:24+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-06-15T11:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30bb6fb39e5c08b9db5bc592d6cbc9a5fc5e67a4'/>
<id>urn:sha1:30bb6fb39e5c08b9db5bc592d6cbc9a5fc5e67a4</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: discourage passing base to gpio_chip</title>
<updated>2015-05-14T10:19:48+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-05-13T11:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af6c235d1a5c112964c3029eb0ed4b52c7aa33bf'/>
<id>urn:sha1:af6c235d1a5c112964c3029eb0ed4b52c7aa33bf</id>
<content type='text'>
Passing a fixed base in struct gpio_chip is done for legacy
systems that cannot handle dynamic allocation. Discourage this
behaviour in the kerneldoc.

Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: cleanup chained handler and data</title>
<updated>2015-05-13T11:02:36+00:00</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
<email>dbaryshkov@gmail.com</email>
</author>
<published>2015-05-12T17:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25e4fe92a20bbffde87500615250f1d54bfb832f'/>
<id>urn:sha1:25e4fe92a20bbffde87500615250f1d54bfb832f</id>
<content type='text'>
Clean up chained handler and handler data if they were set by
gpiochip_set_chained_irqchip().

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: sysfs: clean up chip class-device handling</title>
<updated>2015-05-12T08:46:44+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2015-05-04T15:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a4b6b0a3b55f23f4cc9ad85a1539c581bcb0874'/>
<id>urn:sha1:6a4b6b0a3b55f23f4cc9ad85a1539c581bcb0874</id>
<content type='text'>
Clean gpio-chip class device registration and deregistration.

The class device is registered when a gpio-chip is added (or from
gpiolib_sysfs_init post-core init call), and deregistered when the chip
is removed.

Store the class device in struct gpio_chip directly rather than do a
class-device lookup on deregistration. This also removes the need for
the exported flag.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&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: move pincontrol calls to &lt;linux/gpio/driver.h&gt;</title>
<updated>2015-03-19T08:45:54+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-03-18T00:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=964cb341882f920a1a1043864178f22def3193e4'/>
<id>urn:sha1:964cb341882f920a1a1043864178f22def3193e4</id>
<content type='text'>
These functions do not belong in &lt;asm-generic/gpio.h&gt; since the
split into separate GPIO headers under &lt;linux/gpio/*&gt;. Move them
to &lt;linux/gpio/driver.h&gt; as is apropriate.

Acked-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: allow simultaneous setting of multiple GPIO outputs</title>
<updated>2014-11-27T14:01:18+00:00</updated>
<author>
<name>Rojhalat Ibrahim</name>
<email>imr@rtschenk.de</email>
</author>
<published>2014-11-04T16:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f42424354f5b0ca5413b4fb8528d150692c85b7'/>
<id>urn:sha1:5f42424354f5b0ca5413b4fb8528d150692c85b7</id>
<content type='text'>
Introduce new functions gpiod_set_array &amp; gpiod_set_raw_array to the consumer
interface which allow setting multiple outputs with just one function call.
Also add an optional set_multiple function to the driver interface. Without an
implementation of that function in the chip driver outputs are set
sequentially.

Implementing the set_multiple function in a chip driver allows for:
- Improved performance for certain use cases. The original motivation for this
  was the task of configuring an FPGA. In that specific case, where 9 GPIO
  lines have to be set many times, configuration time goes down from 48 s to
  20 s when using the new function.
- Simultaneous glitch-free setting of multiple pins on any kind of parallel
  bus attached to GPIOs provided they all reside on the same chip and bank.

Limitations:
  Performance is only improved for normal high-low outputs. Open drain and
  open source outputs are always set separately from each other. Those kinds
  of outputs could probably be accelerated in a similar way if we could
  forgo the error checking when setting GPIO directions.

Change log:
  v6: - rebase on current linux-gpio devel branch
  v5: - check can_sleep property per chip
      - remove superfluous checks
      - supplement documentation
  v4: - add gpiod_set_array function for setting logical values
      - change interface of the set_multiple driver function to use
        unsigned long as type for the bit fields
      - use generic bitops (which also use unsigned long for bit fields)
      - do not use ARCH_NR_GPIOS any more
  v3: - add documentation
      - change commit message
  v2: - use descriptor interface
      - allow arbitrary groups of GPIOs spanning multiple chips

Signed-off-by: Rojhalat Ibrahim &lt;imr@rtschenk.de&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Reviewed-by: Mark Brown &lt;broonie@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: rename gpio_lock_as_irq to gpiochip_lock_as_irq</title>
<updated>2014-10-28T16:30:59+00:00</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2014-10-23T08:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3a2e87893125bcd99bd7e1ddf9bfc421e492572'/>
<id>urn:sha1:e3a2e87893125bcd99bd7e1ddf9bfc421e492572</id>
<content type='text'>
This function actually operates on a gpio_chip, so its prefix should
reflect that fact for consistency with other functions defined in
gpio/driver.h.

Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio</title>
<updated>2014-10-09T18:58:15+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-09T18:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea584595fc85e65796335033dfca25ed655cd0ed'/>
<id>urn:sha1:ea584595fc85e65796335033dfca25ed655cd0ed</id>
<content type='text'>
Pull GPIO changes from Linus Walleij:
 "This is the bulk of GPIO changes for the v3.18 development cycle:

   - Increase the default ARCH_NR_GPIO from 256 to 512.  This was done
     to avoid having a custom &lt;asm/gpio.h&gt; header for the x86
     architecture - GPIO is custom and complicated enough as it is
     already! We want to move to a radix to store the descriptors going
     forward, and finally get rid of this fixed array size altogether.

   - Endgame patching of the gpio_remove() semantics initiated by
     Abdoulaye Berthe.  It is not accepted by the system that the
     removal of a GPIO chip fails during eg reboot or shutdown, and
     therefore the return value has now painfully been refactored away.
     For special cases like GPIO expanders on a hot-pluggable bus like
     USB, we may later add some gpiochip_try_remove() call, but for the
     cases we have now, return values are moot.

   - Some incremental refactoring of the gpiolib core and ACPI GPIO
     library for more descriptor usage.

   - Refactor the chained IRQ handler set-up method to handle also
     threaded, nested interrupts and set up the parent IRQ correctly.
     Switch STMPE and TC3589x drivers to use this registration method.

   - Add a .irq_not_threaded flag to the struct gpio_chip, so that also
     GPIO expanders that block but are still not using threaded IRQ
     handlers.

   - New drivers for the ARM64 X-Gene SoC GPIO controller.

   - The syscon GPIO driver has been improved to handle the "DSP GPIO"
     found on the TI Keystone 2 SoC:s.

   - ADNP driver switched to use gpiolib irqchip helpers.

   - Refactor the DWAPB driver to support being instantiated from and
     MFD cell (platform device).

   - Incremental feature improvement in the Zynq, MCP23S08, DWAPB, OMAP,
     Xilinx and Crystalcove drivers.

   - Various minor fixes"

* tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (52 commits)
  gpio: pch: Build context save/restore only for PM
  pinctrl: abx500: get rid of unused variable
  gpio: ks8695: fix 'else should follow close brace '}''
  gpio: stmpe: add verbose debug code
  gpio: stmpe: fix up interrupt enable logic
  gpio: staticize xway_stp_init()
  gpio: handle also nested irqchips in the chained handler set-up
  gpio: set parent irq on chained handlers
  gpiolib: irqchip: use irq_find_mapping while removing irqchip
  gpio: crystalcove: support virtual GPIO
  pinctrl: bcm281xx: make Kconfig dependency more strict
  gpio: kona: enable only on BCM_MOBILE or for compile testing
  gpio, bcm-kona, LLVMLinux: Remove use of __initconst
  gpio: Fix ngpio in gpio-xilinx driver
  gpio: dwapb: fix pointer to integer cast
  gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard
  gpio: xgene: Remove unneeded forward declation for struct xgene_gpio
  gpio: xgene: Fix missing spin_lock_init()
  gpio: ks8695: fix switch case indentation
  gpiolib: add irq_not_threaded flag to gpio_chip
  ...
</content>
</entry>
</feed>
