diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2013-06-28 17:27:02 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-07-20 18:57:27 +0200 |
commit | 0e970cec05635adbe7b686063e2548a8e4afb8f4 (patch) | |
tree | 3964060d8cbf5da9107e319b00afa65f2b709f7f /drivers/gpio/gpio-wm831x.c | |
parent | ad81f0545ef01ea651886dddac4bef6cec930092 (diff) | |
download | op-kernel-dev-0e970cec05635adbe7b686063e2548a8e4afb8f4.zip op-kernel-dev-0e970cec05635adbe7b686063e2548a8e4afb8f4.tar.gz |
gpio/omap: don't create an IRQ mapping for every GPIO on DT
When a GPIO is defined as an interrupt line using Device
Tree, a call to irq_create_of_mapping() is made that calls
irq_create_mapping(). So, is not necessary to do the mapping
for all OMAP GPIO lines and explicitly call irq_create_mapping()
on the driver probe() when booting with Device Tree.
Add a custom IRQ domain .map function handler that will be
called by irq_create_mapping() to map the GPIO lines used as IRQ.
This also allows to execute needed setup code such as configuring
a GPIO as input and enabling the GPIO bank.
Changes since v3:
- Use bank->chip.of_node instead of_have_populated_dt() to check
DT or legacy boot as suggested by Jean-Christophe PLAGNIOL-VILLARD
Changes since v2:
- Unconditionally do the IRQ setup in the .map() function and
only call irq_create_mapping() in the gpio chip init to avoid
code duplication as suggested by Grant Likely.
Changes since v1:
- Split the addition of the .map function handler and the
automatic gpio request in two different patches.
- Add GPIO IRQ setup logic to the irq domain mapping function.
- Only call irq_create_mapping for every GPIO on legacy boot.
- Only setup a GPIO IRQ on the .map function for DeviceTree boot.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-wm831x.c')
0 files changed, 0 insertions, 0 deletions