<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio/gpio-omap.c, branch v4.20</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.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-21T08:23:45Z</updated>
<entry>
<title>gpio: gpio-omap: Revert deferred wakeup quirk handling for regressions</title>
<updated>2018-12-21T08:23:45Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2018-12-07T19:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00ded24c33c586eaaf32764898c56f4a7d8c6d5c'/>
<id>urn:sha1:00ded24c33c586eaaf32764898c56f4a7d8c6d5c</id>
<content type='text'>
Commit ec0daae685b2 ("gpio: omap: Add level wakeup handling for omap4
based SoCs") attempted to fix omap4 GPIO wakeup handling as it was
blocking deeper SoC idle states. However this caused a regression for
GPIOs during runtime having over second long latencies for Ethernet
GPIO interrupt as reportedy by Russell King &lt;rmk+kernel@armlinux.org.uk&gt;.

Let's fix this issue by doing a partial revert of the breaking commit.
We still want to keep the quirk handling around as it is also used for
OMAP_GPIO_QUIRK_IDLE_REMOVE_TRIGGER.

The real fix for omap4 GPIO wakeup handling involves fixes for
omap_set_gpio_trigger() and omap_gpio_unmask_irq() and will be posted
separately. And we must keep the wakeup bit enabled during runtime
because of module doing clock autogating with autoidle configured.

Reported-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Fixes: ec0daae685b2 ("gpio: omap: Add level wakeup handling for omap4
based SoCs")
Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Keerthy &lt;j-keerthy@ti.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Cc: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: Remove set but not used variable 'dev'</title>
<updated>2018-10-01T11:24:47Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2018-09-28T02:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=850d434ea37bd2e15154501279abc5c18bfb72d0'/>
<id>urn:sha1:850d434ea37bd2e15154501279abc5c18bfb72d0</id>
<content type='text'>
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpio/gpio-omap.c: In function 'gpio_omap_cpu_notifier':
drivers/gpio/gpio-omap.c:1327:17: warning:
 variable 'dev' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: drop omap_gpio_list</title>
<updated>2018-10-01T11:23:23Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2018-09-27T23:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4791bc6e3a6b95bed0ee72cf9784ecbb87074ee'/>
<id>urn:sha1:c4791bc6e3a6b95bed0ee72cf9784ecbb87074ee</id>
<content type='text'>
omap_gpio_list is unused so drop it.

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: get rid of the conditional PM runtime calls</title>
<updated>2018-10-01T10:28:57Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2018-09-28T21:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=467480738d0b33335032652b29776d82200db41a'/>
<id>urn:sha1:467480738d0b33335032652b29776d82200db41a</id>
<content type='text'>
OMAP GPIO driver is checking !BANK_USED() used condition before calling PM
runtime API, because of PM runtime calls in
omap2_gpio_prepare/resume_for_idle(). It's not required any more since
"omap gpio add level idle, cpu_pm and drop runtime_irq_safe" series [1]
from Tony Lindgren was accepted and PM runtime management was enabled in
IRQ chip core by commit be45beb2df69 ("genirq: Add runtime power management
support for IRQ chips") .

As result safely drop !BANK_USED() checks from omap_gpio_request/free(),
omap_gpio_irq_bus_lock/unlock() and enable PM runtime management for OMAP
GPIO IRQ chip.

[1] https://www.spinics.net/lists/arm-kernel/msg677583.html
Tested-by: Tony Lindgren &lt;tony@atomide.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: omap: Get rid of pm_runtime_irq_safe()</title>
<updated>2018-09-24T12:24:54Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2018-09-20T19:35:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5284521a290efd5418de79c205b612537ab2b12d'/>
<id>urn:sha1:5284521a290efd5418de79c205b612537ab2b12d</id>
<content type='text'>
If a gpio instance has any GPIO bits requested we do a pm_runtime_get()
on the device. Now with cpu_pm handling the deeper SoC idle state quirks,
let's just remove pm_runtime_irq_safe() call and add a warning in case we
ever happen to encounter it.

Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Cc: Keerthy &lt;j-keerthy@ti.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-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: omap: Remove custom PM calls and use cpu_pm instead</title>
<updated>2018-09-24T12:24:44Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2018-09-20T19:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b764a5863fd834836e65e258303e3a4a81c20f38'/>
<id>urn:sha1:b764a5863fd834836e65e258303e3a4a81c20f38</id>
<content type='text'>
For a long time the gpio-omap custom PM calls have been annoying me so
let's replace them with cpu_pm instead. This will enable GPIO PM for
deeper idle states on omap4. And we can handle GPIO PM for omap2/3/4
in the same way.

Note that with this patch we are also slightly changing GPIO PM to be
less aggressive for omap3 and only will idle GPIO when PER context
may be lost.

For omap2, we don't need to save context and don't want to remove any
triggering so let's add a quirk flag for that.

Let's do this all in a single patch to avoid a situation where old
custom calls still are used with new code.

Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Cc: Keerthy &lt;j-keerthy@ti.com&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-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: omap: Add level wakeup handling for omap4 based SoCs</title>
<updated>2018-09-24T12:24:17Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2018-09-20T19:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec0daae685b20f3bee196719f64d79d1cc40457e'/>
<id>urn:sha1:ec0daae685b20f3bee196719f64d79d1cc40457e</id>
<content type='text'>
I noticed that unlike omap2 and 3 based SoCs, omap4 based SoCs keep
the GPIO clocks enabled for GPIO level interrupts with wakeup enabled.
This blocks deeper idle states as the whole domain will stay busy.

The GPIO functional clock seems to stay enabled if the wakeup register
is enabled and a level interrupt is triggered. In that case the only
way to have the GPIO module idle is to reset it. It is possible this
has gone unnoticed with OSWR (Open SWitch Retention) and off mode
during idle resetting GPIO context most GPIO instances in the earlier
Android trees for example.

Looks like the way to deal with this is to have omap4 based SoCs
only set wake for the duration of idle for level interrupts, and clear
level registers for the idle. With level interrupts we can do this as
the level interrupt from device will be still there on resume.

I've taken the long path to fixing this to avoid yet more hard to
read code. I've set up a quirks flag, and a struct for function
pointers so we can use these to clean up other quirk handling easier
in the later patches. The current level quirk handling is moved to
the new functions.

Cc: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Cc: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Cc: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Tested-by: Keerthy &lt;j-keerthy@ti.com&gt;

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: Add get/set_multiple() callbacks</title>
<updated>2018-08-06T21:46:55Z</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>jmkrzyszt@gmail.com</email>
</author>
<published>2018-07-18T23:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=442af1403a2886f8f6d43f2f67f8a8b001e048d8'/>
<id>urn:sha1:442af1403a2886f8f6d43f2f67f8a8b001e048d8</id>
<content type='text'>
This should make applications utilizing whole banks work faster.

Signed-off-by: Janusz Krzysztofik &lt;jmkrzyszt@gmail.com&gt;
Acked-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: omap: Include the right header</title>
<updated>2018-05-24T12:24:00Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-05-24T12:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7351b077e6832e50b7fa3125f939a42b616b806'/>
<id>urn:sha1:b7351b077e6832e50b7fa3125f939a42b616b806</id>
<content type='text'>
This is a GPIO driver, include only &lt;linux/gpio/driver.h&gt;.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: omap: Improve a size determination</title>
<updated>2018-02-22T14:25:32Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-10T20:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f97364c9b89ea0e60f3fa2e9d6e7bdf9627b891b'/>
<id>urn:sha1:f97364c9b89ea0e60f3fa2e9d6e7bdf9627b891b</id>
<content type='text'>
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
