<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpio/gpiolib.c, branch v3.4.45</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>gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios</title>
<updated>2012-11-05T08:50:41+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2012-10-25T11:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e7355f1112773a015e914b4f815460b7bbe88954'/>
<id>e7355f1112773a015e914b4f815460b7bbe88954</id>
<content type='text'>
commit ad2fab36d7922401c4576fb7ea9b21a47a29a17f upstream.

gpios requested with invalid numbers, or gpios requested from userspace via sysfs
should not try to be deferred on failure.

Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.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 ad2fab36d7922401c4576fb7ea9b21a47a29a17f upstream.

gpios requested with invalid numbers, or gpios requested from userspace via sysfs
should not try to be deferred on failure.

Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.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: Add comments explaining the _cansleep() WARN_ON()s</title>
<updated>2012-03-05T15:05:08+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-02-17T18:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4e449e82871c53ef3b22bd3a50fceabc0638926'/>
<id>e4e449e82871c53ef3b22bd3a50fceabc0638926</id>
<content type='text'>
I've seen users getting very confused by the WARN_ON()s for can_sleep
GPIOs in the atomic-safe paths, the discoverability of the non-atomic
version of the API seems to be hampered by the fact that it's defined
in a header file not the .c file where the warnings are.

Add a couple of comments next to the warnings to help people on their
way.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've seen users getting very confused by the WARN_ON()s for can_sleep
GPIOs in the atomic-safe paths, the discoverability of the non-atomic
version of the API seems to be hampered by the fact that it's defined
in a header file not the .c file where the warnings are.

Add a couple of comments next to the warnings to help people on their
way.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: gpiolib: Support for open source/emitter gpios</title>
<updated>2012-03-05T14:49:44+00:00</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2012-02-17T14:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25553ff0756c59b617af6bdd280c94e943164184'/>
<id>25553ff0756c59b617af6bdd280c94e943164184</id>
<content type='text'>
Adding support for the open source gpio on which client
can specify the open source property through GPIO flag
GPIOF_OPEN_SOURCE at the time of gpio request.
The open source pins are normally pulled low and it
cannot be driven to output with value of 0 and so
when client request for setting the pin to LOW, the
gpio will be set to input direction to make pin in tristate
and hence PULL-DOWN on pins will make the state to LOW.
The open source pin can be driven to HIGH by setting output
with value of 1.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for the open source gpio on which client
can specify the open source property through GPIO flag
GPIOF_OPEN_SOURCE at the time of gpio request.
The open source pins are normally pulled low and it
cannot be driven to output with value of 0 and so
when client request for setting the pin to LOW, the
gpio will be set to input direction to make pin in tristate
and hence PULL-DOWN on pins will make the state to LOW.
The open source pin can be driven to HIGH by setting output
with value of 1.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: gpiolib: Support for open drain/collector gpios</title>
<updated>2012-03-05T14:49:44+00:00</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2012-02-17T14:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aca5ce14eb773a75e5d935968b2e390dc5bd29c3'/>
<id>aca5ce14eb773a75e5d935968b2e390dc5bd29c3</id>
<content type='text'>
Adding support for the open drain gpio on which client
can specify the open drain property through GPIO flag
GPIOF_OPEN_DRAIN at the time of gpio request.
The open drain pins are normally pulled high and it
cannot be driven to output with value of 1 and so
when client request for setting the pin to HIGH, the
gpio will be set to input direction to make pin in tristate
and hence PULL-UP on pins will make the state to HIGH.
The open drain pin can be driven to LOW by setting output
with value of 0.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for the open drain gpio on which client
can specify the open drain property through GPIO flag
GPIOF_OPEN_DRAIN at the time of gpio request.
The open drain pins are normally pulled high and it
cannot be driven to output with value of 1 and so
when client request for setting the pin to HIGH, the
gpio will be set to input direction to make pin in tristate
and hence PULL-UP on pins will make the state to HIGH.
The open drain pin can be driven to LOW by setting output
with value of 0.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviwed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: constify the data parameter to gpiochip_find()</title>
<updated>2012-03-02T22:56:03+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-03-02T22:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6e2cf6514066cdd5a0844b34760029a5a4870318'/>
<id>6e2cf6514066cdd5a0844b34760029a5a4870318</id>
<content type='text'>
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Fix circular locking dependency (3.3-rc2)</title>
<updated>2012-02-15T20:06:07+00:00</updated>
<author>
<name>Ming Lei</name>
<email>tom.leiming@gmail.com</email>
</author>
<published>2012-02-13T14:53:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=864533ceb6db336dead389577c102a8b792a121a'/>
<id>864533ceb6db336dead389577c102a8b792a121a</id>
<content type='text'>
Hi,

On Wed, Feb 8, 2012 at 8:41 PM, Felipe Balbi &lt;balbi@ti.com&gt; wrote:
&gt; Hi guys,
&gt;
&gt; I have just triggered the folllowing:
&gt;
&gt; [   84.860321] ======================================================
&gt; [   84.860321] [ INFO: possible circular locking dependency detected ]
&gt; [   84.860321] 3.3.0-rc2-00026-ge4e8a39 #474 Not tainted
&gt; [   84.860321] -------------------------------------------------------
&gt; [   84.860321] bash/949 is trying to acquire lock:
&gt; [   84.860321]  (sysfs_lock){+.+.+.}, at: [&lt;c0275358&gt;] gpio_value_store+0x24/0xcc
&gt; [   84.860321]
&gt; [   84.860321] but task is already holding lock:
&gt; [   84.860321]  (s_active#22){++++.+}, at: [&lt;c016996c&gt;] sysfs_write_file+0xdc/0x184
&gt; [   84.911468]
&gt; [   84.911468] which lock already depends on the new lock.
&gt; [   84.911468]
&gt; [   84.920043]
&gt; [   84.920043] the existing dependency chain (in reverse order) is:
&gt; [   84.920043]
&gt; [   84.927886] -&gt; #1 (s_active#22){++++.+}:
&gt; [   84.927886]        [&lt;c008f640&gt;] check_prevs_add+0xdc/0x150
&gt; [   84.927886]        [&lt;c008fc18&gt;] validate_chain.clone.24+0x564/0x694
&gt; [   84.927886]        [&lt;c0090cdc&gt;] __lock_acquire+0x49c/0x980
&gt; [   84.951660]        [&lt;c0091838&gt;] lock_acquire+0x98/0x100
&gt; [   84.951660]        [&lt;c016a8e8&gt;] sysfs_deactivate+0xb0/0x100
&gt; [   84.962982]        [&lt;c016b1b4&gt;] sysfs_addrm_finish+0x2c/0x6c
&gt; [   84.962982]        [&lt;c016b8bc&gt;] sysfs_remove_dir+0x84/0x98
&gt; [   84.962982]        [&lt;c02590d8&gt;] kobject_del+0x10/0x78
&gt; [   84.974670]        [&lt;c02c29e8&gt;] device_del+0x140/0x170
&gt; [   84.974670]        [&lt;c02c2a24&gt;] device_unregister+0xc/0x18
&gt; [   84.985382]        [&lt;c0276894&gt;] gpio_unexport+0xbc/0xdc
&gt; [   84.985382]        [&lt;c02768c8&gt;] gpio_free+0x14/0xfc
&gt; [   85.001708]        [&lt;c0276a28&gt;] unexport_store+0x78/0x8c
&gt; [   85.001708]        [&lt;c02c5af8&gt;] class_attr_store+0x18/0x24
&gt; [   85.007293]        [&lt;c0169990&gt;] sysfs_write_file+0x100/0x184
&gt; [   85.018981]        [&lt;c0109d48&gt;] vfs_write+0xb4/0x148
&gt; [   85.018981]        [&lt;c0109fd0&gt;] sys_write+0x40/0x70
&gt; [   85.018981]        [&lt;c0013cc0&gt;] ret_fast_syscall+0x0/0x3c
&gt; [   85.035003]
&gt; [   85.035003] -&gt; #0 (sysfs_lock){+.+.+.}:
&gt; [   85.035003]        [&lt;c008f54c&gt;] check_prev_add+0x680/0x698
&gt; [   85.035003]        [&lt;c008f640&gt;] check_prevs_add+0xdc/0x150
&gt; [   85.052093]        [&lt;c008fc18&gt;] validate_chain.clone.24+0x564/0x694
&gt; [   85.052093]        [&lt;c0090cdc&gt;] __lock_acquire+0x49c/0x980
&gt; [   85.052093]        [&lt;c0091838&gt;] lock_acquire+0x98/0x100
&gt; [   85.069885]        [&lt;c047e280&gt;] mutex_lock_nested+0x3c/0x2f4
&gt; [   85.069885]        [&lt;c0275358&gt;] gpio_value_store+0x24/0xcc
&gt; [   85.069885]        [&lt;c02c18dc&gt;] dev_attr_store+0x18/0x24
&gt; [   85.087158]        [&lt;c0169990&gt;] sysfs_write_file+0x100/0x184
&gt; [   85.087158]        [&lt;c0109d48&gt;] vfs_write+0xb4/0x148
&gt; [   85.098297]        [&lt;c0109fd0&gt;] sys_write+0x40/0x70
&gt; [   85.098297]        [&lt;c0013cc0&gt;] ret_fast_syscall+0x0/0x3c
&gt; [   85.109069]
&gt; [   85.109069] other info that might help us debug this:
&gt; [   85.109069]
&gt; [   85.117462]  Possible unsafe locking scenario:
&gt; [   85.117462]
&gt; [   85.117462]        CPU0                    CPU1
&gt; [   85.128417]        ----                    ----
&gt; [   85.128417]   lock(s_active#22);
&gt; [   85.128417]                                lock(sysfs_lock);
&gt; [   85.128417]                                lock(s_active#22);
&gt; [   85.142486]   lock(sysfs_lock);
&gt; [   85.151794]
&gt; [   85.151794]  *** DEADLOCK ***
&gt; [   85.151794]
&gt; [   85.151794] 2 locks held by bash/949:
&gt; [   85.158020]  #0:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;c01698b8&gt;] sysfs_write_file+0x28/0x184
&gt; [   85.170349]  #1:  (s_active#22){++++.+}, at: [&lt;c016996c&gt;] sysfs_write_file+0xdc/0x184
&gt; [   85.170349]
&gt; [   85.178588] stack backtrace:
&gt; [   85.178588] [&lt;c001b824&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c008de64&gt;] (print_circular_bug+0x100/0x114)
&gt; [   85.193023] [&lt;c008de64&gt;] (print_circular_bug+0x100/0x114) from [&lt;c008f54c&gt;] (check_prev_add+0x680/0x698)
&gt; [   85.193023] [&lt;c008f54c&gt;] (check_prev_add+0x680/0x698) from [&lt;c008f640&gt;] (check_prevs_add+0xdc/0x150)
&gt; [   85.212524] [&lt;c008f640&gt;] (check_prevs_add+0xdc/0x150) from [&lt;c008fc18&gt;] (validate_chain.clone.24+0x564/0x694)
&gt; [   85.212524] [&lt;c008fc18&gt;] (validate_chain.clone.24+0x564/0x694) from [&lt;c0090cdc&gt;] (__lock_acquire+0x49c/0x980)
&gt; [   85.233306] [&lt;c0090cdc&gt;] (__lock_acquire+0x49c/0x980) from [&lt;c0091838&gt;] (lock_acquire+0x98/0x100)
&gt; [   85.233306] [&lt;c0091838&gt;] (lock_acquire+0x98/0x100) from [&lt;c047e280&gt;] (mutex_lock_nested+0x3c/0x2f4)
&gt; [   85.242614] [&lt;c047e280&gt;] (mutex_lock_nested+0x3c/0x2f4) from [&lt;c0275358&gt;] (gpio_value_store+0x24/0xcc)
&gt; [   85.261840] [&lt;c0275358&gt;] (gpio_value_store+0x24/0xcc) from [&lt;c02c18dc&gt;] (dev_attr_store+0x18/0x24)
&gt; [   85.261840] [&lt;c02c18dc&gt;] (dev_attr_store+0x18/0x24) from [&lt;c0169990&gt;] (sysfs_write_file+0x100/0x184)
&gt; [   85.271240] [&lt;c0169990&gt;] (sysfs_write_file+0x100/0x184) from [&lt;c0109d48&gt;] (vfs_write+0xb4/0x148)
&gt; [   85.290008] [&lt;c0109d48&gt;] (vfs_write+0xb4/0x148) from [&lt;c0109fd0&gt;] (sys_write+0x40/0x70)
&gt; [   85.298400] [&lt;c0109fd0&gt;] (sys_write+0x40/0x70) from [&lt;c0013cc0&gt;] (ret_fast_syscall+0x0/0x3c)
&gt; -bash: echo: write error: Operation not permitted
&gt;
&gt; the way to trigger is:
&gt;
&gt; root@legolas:~# cd /sys/class/gpio/
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; export
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; unexport
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; export
&gt; root@legolas:/sys/class/gpio# cd gpio2/
&gt; root@legolas:/sys/class/gpio/gpio2# echo 1 &gt; value

Looks 'sysfs_lock' needn't to be held for unregister, so the patch below may
fix the problem.

Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

On Wed, Feb 8, 2012 at 8:41 PM, Felipe Balbi &lt;balbi@ti.com&gt; wrote:
&gt; Hi guys,
&gt;
&gt; I have just triggered the folllowing:
&gt;
&gt; [   84.860321] ======================================================
&gt; [   84.860321] [ INFO: possible circular locking dependency detected ]
&gt; [   84.860321] 3.3.0-rc2-00026-ge4e8a39 #474 Not tainted
&gt; [   84.860321] -------------------------------------------------------
&gt; [   84.860321] bash/949 is trying to acquire lock:
&gt; [   84.860321]  (sysfs_lock){+.+.+.}, at: [&lt;c0275358&gt;] gpio_value_store+0x24/0xcc
&gt; [   84.860321]
&gt; [   84.860321] but task is already holding lock:
&gt; [   84.860321]  (s_active#22){++++.+}, at: [&lt;c016996c&gt;] sysfs_write_file+0xdc/0x184
&gt; [   84.911468]
&gt; [   84.911468] which lock already depends on the new lock.
&gt; [   84.911468]
&gt; [   84.920043]
&gt; [   84.920043] the existing dependency chain (in reverse order) is:
&gt; [   84.920043]
&gt; [   84.927886] -&gt; #1 (s_active#22){++++.+}:
&gt; [   84.927886]        [&lt;c008f640&gt;] check_prevs_add+0xdc/0x150
&gt; [   84.927886]        [&lt;c008fc18&gt;] validate_chain.clone.24+0x564/0x694
&gt; [   84.927886]        [&lt;c0090cdc&gt;] __lock_acquire+0x49c/0x980
&gt; [   84.951660]        [&lt;c0091838&gt;] lock_acquire+0x98/0x100
&gt; [   84.951660]        [&lt;c016a8e8&gt;] sysfs_deactivate+0xb0/0x100
&gt; [   84.962982]        [&lt;c016b1b4&gt;] sysfs_addrm_finish+0x2c/0x6c
&gt; [   84.962982]        [&lt;c016b8bc&gt;] sysfs_remove_dir+0x84/0x98
&gt; [   84.962982]        [&lt;c02590d8&gt;] kobject_del+0x10/0x78
&gt; [   84.974670]        [&lt;c02c29e8&gt;] device_del+0x140/0x170
&gt; [   84.974670]        [&lt;c02c2a24&gt;] device_unregister+0xc/0x18
&gt; [   84.985382]        [&lt;c0276894&gt;] gpio_unexport+0xbc/0xdc
&gt; [   84.985382]        [&lt;c02768c8&gt;] gpio_free+0x14/0xfc
&gt; [   85.001708]        [&lt;c0276a28&gt;] unexport_store+0x78/0x8c
&gt; [   85.001708]        [&lt;c02c5af8&gt;] class_attr_store+0x18/0x24
&gt; [   85.007293]        [&lt;c0169990&gt;] sysfs_write_file+0x100/0x184
&gt; [   85.018981]        [&lt;c0109d48&gt;] vfs_write+0xb4/0x148
&gt; [   85.018981]        [&lt;c0109fd0&gt;] sys_write+0x40/0x70
&gt; [   85.018981]        [&lt;c0013cc0&gt;] ret_fast_syscall+0x0/0x3c
&gt; [   85.035003]
&gt; [   85.035003] -&gt; #0 (sysfs_lock){+.+.+.}:
&gt; [   85.035003]        [&lt;c008f54c&gt;] check_prev_add+0x680/0x698
&gt; [   85.035003]        [&lt;c008f640&gt;] check_prevs_add+0xdc/0x150
&gt; [   85.052093]        [&lt;c008fc18&gt;] validate_chain.clone.24+0x564/0x694
&gt; [   85.052093]        [&lt;c0090cdc&gt;] __lock_acquire+0x49c/0x980
&gt; [   85.052093]        [&lt;c0091838&gt;] lock_acquire+0x98/0x100
&gt; [   85.069885]        [&lt;c047e280&gt;] mutex_lock_nested+0x3c/0x2f4
&gt; [   85.069885]        [&lt;c0275358&gt;] gpio_value_store+0x24/0xcc
&gt; [   85.069885]        [&lt;c02c18dc&gt;] dev_attr_store+0x18/0x24
&gt; [   85.087158]        [&lt;c0169990&gt;] sysfs_write_file+0x100/0x184
&gt; [   85.087158]        [&lt;c0109d48&gt;] vfs_write+0xb4/0x148
&gt; [   85.098297]        [&lt;c0109fd0&gt;] sys_write+0x40/0x70
&gt; [   85.098297]        [&lt;c0013cc0&gt;] ret_fast_syscall+0x0/0x3c
&gt; [   85.109069]
&gt; [   85.109069] other info that might help us debug this:
&gt; [   85.109069]
&gt; [   85.117462]  Possible unsafe locking scenario:
&gt; [   85.117462]
&gt; [   85.117462]        CPU0                    CPU1
&gt; [   85.128417]        ----                    ----
&gt; [   85.128417]   lock(s_active#22);
&gt; [   85.128417]                                lock(sysfs_lock);
&gt; [   85.128417]                                lock(s_active#22);
&gt; [   85.142486]   lock(sysfs_lock);
&gt; [   85.151794]
&gt; [   85.151794]  *** DEADLOCK ***
&gt; [   85.151794]
&gt; [   85.151794] 2 locks held by bash/949:
&gt; [   85.158020]  #0:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;c01698b8&gt;] sysfs_write_file+0x28/0x184
&gt; [   85.170349]  #1:  (s_active#22){++++.+}, at: [&lt;c016996c&gt;] sysfs_write_file+0xdc/0x184
&gt; [   85.170349]
&gt; [   85.178588] stack backtrace:
&gt; [   85.178588] [&lt;c001b824&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c008de64&gt;] (print_circular_bug+0x100/0x114)
&gt; [   85.193023] [&lt;c008de64&gt;] (print_circular_bug+0x100/0x114) from [&lt;c008f54c&gt;] (check_prev_add+0x680/0x698)
&gt; [   85.193023] [&lt;c008f54c&gt;] (check_prev_add+0x680/0x698) from [&lt;c008f640&gt;] (check_prevs_add+0xdc/0x150)
&gt; [   85.212524] [&lt;c008f640&gt;] (check_prevs_add+0xdc/0x150) from [&lt;c008fc18&gt;] (validate_chain.clone.24+0x564/0x694)
&gt; [   85.212524] [&lt;c008fc18&gt;] (validate_chain.clone.24+0x564/0x694) from [&lt;c0090cdc&gt;] (__lock_acquire+0x49c/0x980)
&gt; [   85.233306] [&lt;c0090cdc&gt;] (__lock_acquire+0x49c/0x980) from [&lt;c0091838&gt;] (lock_acquire+0x98/0x100)
&gt; [   85.233306] [&lt;c0091838&gt;] (lock_acquire+0x98/0x100) from [&lt;c047e280&gt;] (mutex_lock_nested+0x3c/0x2f4)
&gt; [   85.242614] [&lt;c047e280&gt;] (mutex_lock_nested+0x3c/0x2f4) from [&lt;c0275358&gt;] (gpio_value_store+0x24/0xcc)
&gt; [   85.261840] [&lt;c0275358&gt;] (gpio_value_store+0x24/0xcc) from [&lt;c02c18dc&gt;] (dev_attr_store+0x18/0x24)
&gt; [   85.261840] [&lt;c02c18dc&gt;] (dev_attr_store+0x18/0x24) from [&lt;c0169990&gt;] (sysfs_write_file+0x100/0x184)
&gt; [   85.271240] [&lt;c0169990&gt;] (sysfs_write_file+0x100/0x184) from [&lt;c0109d48&gt;] (vfs_write+0xb4/0x148)
&gt; [   85.290008] [&lt;c0109d48&gt;] (vfs_write+0xb4/0x148) from [&lt;c0109fd0&gt;] (sys_write+0x40/0x70)
&gt; [   85.298400] [&lt;c0109fd0&gt;] (sys_write+0x40/0x70) from [&lt;c0013cc0&gt;] (ret_fast_syscall+0x0/0x3c)
&gt; -bash: echo: write error: Operation not permitted
&gt;
&gt; the way to trigger is:
&gt;
&gt; root@legolas:~# cd /sys/class/gpio/
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; export
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; unexport
&gt; root@legolas:/sys/class/gpio# echo 2 &gt; export
&gt; root@legolas:/sys/class/gpio# cd gpio2/
&gt; root@legolas:/sys/class/gpio/gpio2# echo 1 &gt; value

Looks 'sysfs_lock' needn't to be held for unregister, so the patch below may
fix the problem.

Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()</title>
<updated>2011-12-12T20:40:16+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-12-12T16:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336'/>
<id>1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336</id>
<content type='text'>
A large chunk of qe_pin_request() is unnecessarily cut-and-paste
directly from of_get_named_gpio_flags().  This patch cuts out the
duplicate code and replaces it with a call to of_get_gpio().

v2: fixed compile error due to missing gpio_to_chip()

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A large chunk of qe_pin_request() is unnecessarily cut-and-paste
directly from of_get_named_gpio_flags().  This patch cuts out the
duplicate code and replaces it with a call to of_get_gpio().

v2: fixed compile error due to missing gpio_to_chip()

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: output basic details and consolidate gpio device drivers</title>
<updated>2011-12-12T20:40:16+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-11-06T18:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=64842aad5ec5ea3b6f6e716ce53a863f7c409da8'/>
<id>64842aad5ec5ea3b6f6e716ce53a863f7c409da8</id>
<content type='text'>
This patch adds a kernel message, containing GPIO range and device
name on successful device registration, and removes duplicate messages from the following drivers:
	* gpio-adp5588
	* gpio-bt8xx
	* gpio-cs5535
	* gpio-janz-ttl
	* gpio-nomadik
	* gpio-pcf857x
	* gpio-xilinx
	* drivers/of/gpio.c

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a kernel message, containing GPIO range and device
name on successful device registration, and removes duplicate messages from the following drivers:
	* gpio-adp5588
	* gpio-bt8xx
	* gpio-cs5535
	* gpio-janz-ttl
	* gpio-nomadik
	* gpio-pcf857x
	* gpio-xilinx
	* drivers/of/gpio.c

Signed-off-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: make gpio_{request,free}_array gpio array parameter const</title>
<updated>2011-05-27T23:56:45+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2011-05-25T23:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c295975a85b049385dfe0d5ee0d4d543619fbdc'/>
<id>7c295975a85b049385dfe0d5ee0d4d543619fbdc</id>
<content type='text'>
gpio_{request,free}_array should not (and do not) modify the passed gpio
array, so make the parameter const.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gpio_{request,free}_array should not (and do not) modify the passed gpio
array, so make the parameter const.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: add trace events for setting direction and value</title>
<updated>2011-05-20T06:40:19+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2011-05-20T06:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f397c2144e46d9127662fdb6314f21960d8563d'/>
<id>3f397c2144e46d9127662fdb6314f21960d8563d</id>
<content type='text'>
This patch allows to trace gpio operations using ftrace

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows to trace gpio operations using ftrace

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
</feed>
