All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	tony@atomide.com
Cc: Javier Martinez Canillas <javier@dowhile0.org>,
	ssantosh@kernel.org, Kevin Hilman <khilman@deeprootsystems.com>,
	linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org,
	Grygorii Strashko <grygorii.strashko@linaro.org>
Subject: [RFC/RFT PATCH 4/7] gpio: omap: rework omap_gpio_request to touch only gpio specific registers
Date: Fri, 22 May 2015 17:35:51 +0300	[thread overview]
Message-ID: <1432305354-5968-5-git-send-email-grygorii.strashko@linaro.org> (raw)
In-Reply-To: <1432305354-5968-1-git-send-email-grygorii.strashko@linaro.org>

The GPIO Chip and GPIO IRQ Chip functionality are essentially orthogonal,
so GPIO Chip implementation shouldn't touch GPIO IRQ specific registers
and vise versa.

Hence, rework omap_gpio_request:
- don't reset GPIO IRQ triggering type to IRQ_TYPE_NONE, because
  GPIO irqchip should be responsible for that;
- call directly omap_enable_gpio_module as all needed checks are already
  present inside it.

Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
---
 drivers/gpio/gpio-omap.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index d933b99..2fbd569 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -668,14 +668,7 @@ static int omap_gpio_request(struct gpio_chip *chip, unsigned offset)
 		pm_runtime_get_sync(bank->dev);
 
 	spin_lock_irqsave(&bank->lock, flags);
-	/* Set trigger to none. You need to enable the desired trigger with
-	 * request_irq() or set_irq_type(). Only do this if the IRQ line has
-	 * not already been requested.
-	 */
-	if (!LINE_USED(bank->irq_usage, offset)) {
-		omap_set_gpio_triggering(bank, offset, IRQ_TYPE_NONE);
-		omap_enable_gpio_module(bank, offset);
-	}
+	omap_enable_gpio_module(bank, offset);
 	bank->mod_usage |= BIT(offset);
 	spin_unlock_irqrestore(&bank->lock, flags);
 
-- 
1.9.1


  parent reply	other threads:[~2015-05-22 14:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 14:35 [RFC/RFT PATCH 0/7] gpio: omap: rework and fixes Grygorii Strashko
2015-05-22 14:35 ` [PATCH 1/7] gpio: omap: fix omap_gpio_free to not clean up irq configuration Grygorii Strashko
2015-06-01 13:11   ` Linus Walleij
2015-06-02  9:31     ` Javier Martinez Canillas
2015-05-22 14:35 ` [PATCH 2/7] gpio: omap: fix error handling in omap_gpio_irq_type Grygorii Strashko
2015-06-02  9:40   ` Javier Martinez Canillas
2015-06-02 14:27     ` Grygorii.Strashko@linaro.org
2015-06-03 19:34       ` Grygorii.Strashko@linaro.org
2015-05-22 14:35 ` [RFC/RFT PATCH 3/7] gpio: omap: rework omap_x_irq_shutdown to touch only irqs specific registers Grygorii Strashko
2015-05-22 14:35 ` Grygorii Strashko [this message]
2015-05-22 14:35 ` [RFC/RFT PATCH 5/7] gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly Grygorii Strashko
2015-05-22 14:35 ` [RFC/RFT PATCH 6/7] gpio: omap: clean up omap_gpio_irq_type Grygorii Strashko
2015-05-22 17:53   ` Tony Lindgren
2015-05-22 14:35 ` [RFC/RFT PATCH v2 7/7] gpio: omap: ensure that runtime pm will disable unused gpio banks Grygorii Strashko
2015-05-22 18:10   ` Tony Lindgren
2015-05-25 14:46     ` Grygorii.Strashko@linaro.org
2015-05-25 15:08       ` Grygorii.Strashko@linaro.org
2015-05-22 19:03 ` [RFC/RFT PATCH 0/7] gpio: omap: rework and fixes Tony Lindgren
2015-06-01 13:15   ` Linus Walleij
2015-06-01 17:14     ` santosh shilimkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432305354-5968-5-git-send-email-grygorii.strashko@linaro.org \
    --to=grygorii.strashko@linaro.org \
    --cc=gnurou@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.