linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Shawn Guo" <shawn.guo@linaro.org>,
	"\"Benoît Thébaudeau\"" <benoit.thebaudeau@advansee.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Grant Likely" <grant.likely@secretlab.ca>,
	"Sascha Hauer" <kernel@pengutronix.de>
Subject: linux-next: manual merge of the arm-soc tree with the gpio-lw tree
Date: Mon, 9 Jul 2012 16:02:48 +1000	[thread overview]
Message-ID: <20120709160248.c746b4286aa2558160f86571@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2586 bytes --]

Hi all,

Today's linux-next merge of the arm-soc tree got a conflict in
drivers/gpio/gpio-mxc.c between commit fef2bca203e9 ("gpio/mxc: use the
edge_sel feature if available") from the gpio-lw tree and commit
1ab7ef158dfb ("gpio/mxc: move irq_domain_add_legacy call into gpio
driver") from the arm-soc tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/gpio/gpio-mxc.c
index f45bb54,e5db670..0000000
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@@ -184,19 -160,15 +184,19 @@@ static int gpio_set_irq_type(struct irq
  		edge = GPIO_INT_FALL_EDGE;
  		break;
  	case IRQ_TYPE_EDGE_BOTH:
 -		val = gpio_get_value(gpio);
 -		if (val) {
 -			edge = GPIO_INT_LOW_LEV;
 -			pr_debug("mxc: set GPIO %d to low trigger\n", gpio);
 +		if (GPIO_EDGE_SEL >= 0) {
 +			edge = GPIO_INT_BOTH_EDGES;
  		} else {
 -			edge = GPIO_INT_HIGH_LEV;
 -			pr_debug("mxc: set GPIO %d to high trigger\n", gpio);
 +			val = gpio_get_value(gpio);
 +			if (val) {
 +				edge = GPIO_INT_LOW_LEV;
 +				pr_debug("mxc: set GPIO %d to low trigger\n", gpio);
 +			} else {
 +				edge = GPIO_INT_HIGH_LEV;
 +				pr_debug("mxc: set GPIO %d to high trigger\n", gpio);
 +			}
- 			port->both_edges |= 1 << (gpio & 31);
++			port->both_edges |= 1 << gpio_idx;
  		}
 -		port->both_edges |= 1 << gpio_idx;
  		break;
  	case IRQ_TYPE_LEVEL_LOW:
  		edge = GPIO_INT_LOW_LEV;
@@@ -208,24 -180,11 +208,24 @@@
  		return -EINVAL;
  	}
  
 -	reg += GPIO_ICR1 + ((gpio_idx & 0x10) >> 2); /* ICR1 or ICR2 */
 -	bit = gpio_idx & 0xf;
 -	val = readl(reg) & ~(0x3 << (bit << 1));
 -	writel(val | (edge << (bit << 1)), reg);
 +	if (GPIO_EDGE_SEL >= 0) {
 +		val = readl(port->base + GPIO_EDGE_SEL);
 +		if (edge == GPIO_INT_BOTH_EDGES)
- 			writel(val | (1 << (gpio & 0x1f)),
++			writel(val | (1 << gpio_idx),
 +				port->base + GPIO_EDGE_SEL);
 +		else
- 			writel(val & ~(1 << (gpio & 0x1f)),
++			writel(val & ~(1 << gpio_idx),
 +				port->base + GPIO_EDGE_SEL);
 +	}
 +
 +	if (edge != GPIO_INT_BOTH_EDGES) {
- 		reg += GPIO_ICR1 + ((gpio & 0x10) >> 2); /* lower or upper register */
- 		bit = gpio & 0xf;
++		reg += GPIO_ICR1 + ((gpio_idx & 0x10) >> 2); /* ICR1 or ICR2 */
++		bit = gpio_idx & 0xf;
 +		val = readl(reg) & ~(0x3 << (bit << 1));
 +		writel(val | (edge << (bit << 1)), reg);
 +	}
 +
- 	writel(1 << (gpio & 0x1f), port->base + GPIO_ISR);
+ 	writel(1 << gpio_idx, port->base + GPIO_ISR);
  
  	return 0;
  }

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-07-09  6:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09  6:02 Stephen Rothwell [this message]
2012-10-26  3:24 linux-next: manual merge of the arm-soc tree with the gpio-lw tree Stephen Rothwell
2013-04-09  7:47 Stephen Rothwell
2013-04-09  9:04 ` Tony Prisk

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=20120709160248.c746b4286aa2558160f86571@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=arnd@arndb.de \
    --cc=benoit.thebaudeau@advansee.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=shawn.guo@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).