If a gpio interrupt is already enabled, do not re-enable it again and do not
clear the interrupt status.
Before this patch: if an edge interrupt is marked as wakeup, the gpio sys
suspend will enable it. On resume, the gpio sys resume would clear the
intr_status of the wakeup irq. Thus, if this particular wakeup irq triggered
and woke us up, we would lose its intr_status before calling the gpio summary
handler. Now, when the summary handler is finally called, the irq handler for
the wakeup interrupt is never called.
With this change: we are *not* re-enabling the gpio-irq again to make sure that
when the irq framework unmasks all irqs on resume, it does not clear the
intr_status.
Change-Id: Ia5a9c6b00173a56b1abbdd4d4821becb7311d7f6
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
The gpio driver was not a true platform driver and hence wasn't
supported by device tree. This patch fixes that for non-DT targets
by making sure the device gets added early on during board init.
For DT-targets, adding the gpio-controller property for the device
makes sure the msmgpio device gets probed.
This change is done for all TLMM_v2 targets (msm8660 and future)
TLMM_V1 targets remain unaffected.
Change-Id: I8a55ab1e2af0366b3e6893b334ba2396d2a83190
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
After the change to keep the RAW_STATUS_EN always on, the
interrupt status bit was latched and could be set during
other (non-interrupt) activity on the GPIO line. This would
end up triggering the interrupt as soon as it was unmasked.
Hence, clear the interrupt status before unmasking the gpio
interrupt. This keeps the behavior and expectations same as
when the RAW_STATUS_EN was toggled and it prevented the
interrupt status to be updated while the interrupt was masked.
Change-Id: I3ccb31b5d8a7efe93f8253d4aff4a1c44281163f
CRs-Fixed: 346861
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
The current code sets up irq attributes at postcore_init. But
with irqdomains, irqs are mapped later at runtime. Thus we need
to set these parameters within the irqdomain map routine for
systems that are using Device Tree.
Change-Id: I185ebc4efdb194d690ecbec75171709bd09e0588
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
TLMM v3 version has dedicated pads for only SDC1
and SDC2 among all SDC slots as opposed to v2 version.
Change-Id: I73c54f0a2799e6ffca74e5b846ac8339d0af3bb8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
The following merge commit chose the irq_domain implementation
from AU_LINUX_ANDROID_ICS.04.00.04.00.126 instead of the version
in v3.4.
commit f132c6cf77251e011e1dad0ec88c0b1fda16d5aa
Merge: 23016de 3f6240f
Author: Steve Muckle <smuckle@codeaurora.org>
Date: Wed Jun 6 18:30:57 2012 -0700
Merge commit 'AU_LINUX_ANDROID_ICS.04.00.04.00.126' into
msm-3.4
Since this version is inconsistent with the upstream,
port the irq_domain framework to the version in v3.4 and
makes all necessary changes to clients that are out of spec.
Details of client ports are below.
-Update the qpnp-int driver for revmap irq_domain API. The revmap
irq_domain implementation introduces a reverse lookup scheme using
a radix tree. This scheme is useful for controllers like qpnp-int
that require a large range of hwirqs.
-Bring the ARM GIC driver up to v3.4, being careful
to port existing CAF changes.
-Partially port the gpio-msm-common driver to the new irq_domain API.
Enable the gpio-msm-common driver to work with the new irq_domain
API using a linear revmap. It is not a full port since irq_domain
is still only registered for Device Tree configurations. It should
be registered even for legacy configurations.
In addition, the irq_domains .map function should be setting all
the fields currently done in msm_gpio_probe(). That's not
currently possible since msm_gpio_probe is invoked
unconditionally - even from Device Tree configurations.
Finally, gpio-msm-common should be converted into a real
platform_device so that probe() is invoked due to driver and
device matching.
Change-Id: I19fa50171bd244759fb6076e3cddc70896d8727b
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
In the process we replace the upstream versions of the file with
our own and introduce gpio-msm-v3.c and gpio-msm-common.c.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>