<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpio, branch v3.2.60</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.60</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.60'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-04-30T15:23:23Z</updated>
<entry>
<title>gpio: mxs: Allow for recursive enable_irq_wake() call</title>
<updated>2014-04-30T15:23:23Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2014-03-24T02:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4f86b545ffcdea19ea644920e84d644cf2e6b1e8'/>
<id>urn:sha1:4f86b545ffcdea19ea644920e84d644cf2e6b1e8</id>
<content type='text'>
commit a585f87c863e4e1d496459d382b802bf5ebe3717 upstream.

The scenario here is that someone calls enable_irq_wake() from somewhere
in the code. This will result in the lockdep producing a backtrace as can
be seen below. In my case, this problem is triggered when using the wl1271
(TI WlCore) driver found in drivers/net/wireless/ti/ .

The problem cause is rather obvious from the backtrace, but let's outline
the dependency. enable_irq_wake() grabs the IRQ buslock in irq_set_irq_wake(),
which in turns calls mxs_gpio_set_wake_irq() . But mxs_gpio_set_wake_irq()
calls enable_irq_wake() again on the one-level-higher IRQ , thus it tries to
grab the IRQ buslock again in irq_set_irq_wake() . Because the spinlock in
irq_set_irq_wake()-&gt;irq_get_desc_buslock()-&gt;__irq_get_desc_lock() is not
marked as recursive, lockdep will spew the stuff below.

We know we can safely re-enter the lock, so use IRQ_GC_INIT_NESTED_LOCK to
fix the spew.

 =============================================
 [ INFO: possible recursive locking detected ]
 3.10.33-00012-gf06b763-dirty #61 Not tainted
 ---------------------------------------------
 kworker/0:1/18 is trying to acquire lock:
  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

 but task is already holding lock:
  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

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

        CPU0
        ----
   lock(&amp;irq_desc_lock_class);
   lock(&amp;irq_desc_lock_class);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

 3 locks held by kworker/0:1/18:
  #0:  (events){.+.+.+}, at: [&lt;c0036308&gt;] process_one_work+0x134/0x4a4
  #1:  ((&amp;fw_work-&gt;work)){+.+.+.}, at: [&lt;c0036308&gt;] process_one_work+0x134/0x4a4
  #2:  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

 stack backtrace:
 CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 3.10.33-00012-gf06b763-dirty #61
 Workqueue: events request_firmware_work_func
 [&lt;c0013eb4&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c0011c74&gt;] (show_stack+0x10/0x14)
 [&lt;c0011c74&gt;] (show_stack+0x10/0x14) from [&lt;c005bb08&gt;] (__lock_acquire+0x140c/0x1a64)
 [&lt;c005bb08&gt;] (__lock_acquire+0x140c/0x1a64) from [&lt;c005c6a8&gt;] (lock_acquire+0x9c/0x104)
 [&lt;c005c6a8&gt;] (lock_acquire+0x9c/0x104) from [&lt;c051d5a4&gt;] (_raw_spin_lock_irqsave+0x44/0x58)
 [&lt;c051d5a4&gt;] (_raw_spin_lock_irqsave+0x44/0x58) from [&lt;c00685f0&gt;] (__irq_get_desc_lock+0x48/0x88)
 [&lt;c00685f0&gt;] (__irq_get_desc_lock+0x48/0x88) from [&lt;c0068e78&gt;] (irq_set_irq_wake+0x20/0xf4)
 [&lt;c0068e78&gt;] (irq_set_irq_wake+0x20/0xf4) from [&lt;c027260c&gt;] (mxs_gpio_set_wake_irq+0x1c/0x24)
 [&lt;c027260c&gt;] (mxs_gpio_set_wake_irq+0x1c/0x24) from [&lt;c0068cf4&gt;] (set_irq_wake_real+0x30/0x44)
 [&lt;c0068cf4&gt;] (set_irq_wake_real+0x30/0x44) from [&lt;c0068ee4&gt;] (irq_set_irq_wake+0x8c/0xf4)
 [&lt;c0068ee4&gt;] (irq_set_irq_wake+0x8c/0xf4) from [&lt;c0310748&gt;] (wlcore_nvs_cb+0x10c/0x97c)
 [&lt;c0310748&gt;] (wlcore_nvs_cb+0x10c/0x97c) from [&lt;c02be5e8&gt;] (request_firmware_work_func+0x38/0x58)
 [&lt;c02be5e8&gt;] (request_firmware_work_func+0x38/0x58) from [&lt;c0036394&gt;] (process_one_work+0x1c0/0x4a4)
 [&lt;c0036394&gt;] (process_one_work+0x1c0/0x4a4) from [&lt;c0036a4c&gt;] (worker_thread+0x138/0x394)
 [&lt;c0036a4c&gt;] (worker_thread+0x138/0x394) from [&lt;c003cb74&gt;] (kthread+0xa4/0xb0)
 [&lt;c003cb74&gt;] (kthread+0xa4/0xb0) from [&lt;c000ee00&gt;] (ret_from_fork+0x14/0x34)
 wlcore: loaded

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio: msm: Fix irq mask/unmask by writing bits instead of numbers</title>
<updated>2014-02-15T19:20:13Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-12-10T23:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=50226b9992e79d43579b92650ecbfdbc1479980c'/>
<id>urn:sha1:50226b9992e79d43579b92650ecbfdbc1479980c</id>
<content type='text'>
commit 4cc629b7a20945ce35628179180329b6bc9e552b upstream.

We should be writing bits here but instead we're writing the
numbers that correspond to the bits we want to write. Fix it by
wrapping the numbers in the BIT() macro. This fixes gpios acting
as interrupts.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536</title>
<updated>2014-01-03T04:33:28Z</updated>
<author>
<name>Liu Gang</name>
<email>Gang.Liu@freescale.com</email>
</author>
<published>2013-11-22T08:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e83ec2b76f528aa8e06e3219f1763f3344b6dec6'/>
<id>urn:sha1:e83ec2b76f528aa8e06e3219f1763f3344b6dec6</id>
<content type='text'>
commit 1aeef303b5d9e243c41d5b80f8bb059366514a10 upstream.

For MPC8572/MPC8536, the status of GPIOs defined as output
cannot be determined by reading GPDAT register, so the code
use shadow data register instead. But the code may give the
wrong status of GPIOs defined as input under some scenarios:

1. If some pins were configured as inputs and were asserted
high before booting the kernel, the shadow data has been
initialized with those pin values.
2. Some pins have been configured as output first and have
been set to the high value, then reconfigured as input.

The above cases will make the shadow data for those input
pins to be set to high. Then reading the pin status will
always return high even if the actual pin status is low.

The code should eliminate the effects of the shadow data to
the input pins, and the status of those pins should be
read directly from GPDAT.

Acked-by: Scott Wood &lt;scottwood@freescale.com&gt;
Acked-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Signed-off-by: Liu Gang &lt;Gang.Liu@freescale.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio-timberdale: fix a potential wrapping issue</title>
<updated>2012-11-16T16:46:52Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-10-11T06:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a7b9047f5512e10e6ef89cd36e5b572bf13f60e'/>
<id>urn:sha1:5a7b9047f5512e10e6ef89cd36e5b572bf13f60e</id>
<content type='text'>
commit d79550a7bc35c16476ebdc27c78378d8093390ec upstream.

-&gt;last_ier is an unsigned long but the high bits can't be used int the
original code because the shift wraps.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio-lpc32xx: Fix value handling of gpio_direction_output()</title>
<updated>2012-10-10T02:31:04Z</updated>
<author>
<name>Roland Stigge</name>
<email>stigge@antcom.de</email>
</author>
<published>2012-09-20T08:48:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=247a9ca13ccd0e1cfd81b481e91d365950eaeaaf'/>
<id>urn:sha1:247a9ca13ccd0e1cfd81b481e91d365950eaeaaf</id>
<content type='text'>
commit b1268d3737c6316016026245eef276eda6b0a621 upstream.

For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument
(initial value of output). This patch fixes this by setting the level
accordingly.

Signed-off-by: Roland Stigge &lt;stigge@antcom.de&gt;
Acked-by: Alexandre Pereira da Silva &lt;aletes.xgr@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpiolib: wm8994: Pay attention to the value set when enabling as output</title>
<updated>2012-07-25T03:11:08Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-06-09T03:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43fc6bce37ff39ab5010afadf1ea86e7cc9c2b37'/>
<id>urn:sha1:43fc6bce37ff39ab5010afadf1ea86e7cc9c2b37</id>
<content type='text'>
commit 8cd578b6e28693f357867a77598a88ef3deb6b39 upstream.

Not paying attention to the value being set is a bad thing because it
means that we'll not set the hardware up to reflect what was requested.
Not setting the hardware up to reflect what was requested means that the
caller won't get the results they wanted.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio: mpc8xxx: Prevent NULL pointer deref in demux handler</title>
<updated>2012-05-30T23:43:59Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2012-05-03T10:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be8ad46e10b99411acae4f0461be547f32a08686'/>
<id>urn:sha1:be8ad46e10b99411acae4f0461be547f32a08686</id>
<content type='text'>
commit d6de85e85edcc38c9edcde45a0a568818fcddc13 upstream.

commit cfadd838(powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO
driver) added an unconditional call of chip-&gt;irq_eoi() to the demux
handler.

This leads to a NULL pointer derefernce on MPC512x platforms which use
this driver as well.

Make it conditional.

Reported-by: Thomas Wucher &lt;thwucher@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Felix Radensky &lt;felix@embedded-sol.com&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio: Add missing spin_lock_init in gpio-ml-ioh driver</title>
<updated>2012-05-20T21:56:43Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-02-01T02:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=347e3c6d3ed876bb5c36189265be02e952679e09'/>
<id>urn:sha1:347e3c6d3ed876bb5c36189265be02e952679e09</id>
<content type='text'>
commit 7e3a70fb7bccada029c188c89bfbf3c0a63c1500 upstream.

This bug was introduced by commit 54be5663
"gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct
ioh_gpio but never init the spinlock.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>gpio: Add missing spin_lock_init in gpio-pch driver</title>
<updated>2012-04-22T22:31:12Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-02-01T02:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4195441e3c6eaa3a118804dd9d8d04e5d3fe2149'/>
<id>urn:sha1:4195441e3c6eaa3a118804dd9d8d04e5d3fe2149</id>
<content type='text'>
commit d166370ad86b33b1111af3a0cdd7de94e03789a6 upstream.

This bug was introduced by commit d568a681
"gpio-pch: add spinlock in suspend/resume processing"
which adds a spinlock to struct pch_gpio but never init the spinlock.

Reported-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH</title>
<updated>2012-04-22T22:31:12Z</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.lapis-semi.com</email>
</author>
<published>2011-10-28T00:23:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10ec1cf0d40f2728f6c96a0a7c6f0365c231738a'/>
<id>urn:sha1:10ec1cf0d40f2728f6c96a0a7c6f0365c231738a</id>
<content type='text'>
commit 868fea0507308b6548bba7debe5f5c2d5ca47fca upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
