linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2013-08-29  7:17 Stephen Rothwell
  2013-08-29  7:34 ` Linus Walleij
  2013-08-29  7:45 ` Linus Walleij
  0 siblings, 2 replies; 16+ messages in thread
From: Stephen Rothwell @ 2013-08-29  7:17 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Maxime Ripard, Linus Walleij, Sherman Yin

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
drivers/pinctrl/pinctrl-sunxi.c between commit 1bee963db9dd ("pinctrl:
sunxi: Add spinlocks") from Linus' tree and commit 03b054e9696c
("pinctrl: Pass all configs to driver on pin_config_set()") from the
pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/pinctrl/pinctrl-sunxi.c
index 94716c7,8dbd465..0000000
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@@ -282,56 -282,47 +283,60 @@@ static int sunxi_pconf_group_set(struc
  	u32 val, mask;
  	u16 strength;
  	u8 dlevel;
+ 	int i;
  
- 	switch (pinconf_to_config_param(config)) {
- 	case PIN_CONFIG_DRIVE_STRENGTH:
- 		strength = pinconf_to_config_argument(config);
- 		if (strength > 40)
- 			return -EINVAL;
- 		/*
- 		 * We convert from mA to what the register expects:
- 		 *   0: 10mA
- 		 *   1: 20mA
- 		 *   2: 30mA
- 		 *   3: 40mA
- 		 */
- 		dlevel = strength / 10 - 1;
- 
- 		spin_lock_irqsave(&pctl->lock, flags);
- 
- 		val = readl(pctl->membase + sunxi_dlevel_reg(g->pin));
- 	        mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(g->pin);
- 		writel((val & ~mask) | dlevel << sunxi_dlevel_offset(g->pin),
- 			pctl->membase + sunxi_dlevel_reg(g->pin));
- 
- 		spin_unlock_irqrestore(&pctl->lock, flags);
- 		break;
- 	case PIN_CONFIG_BIAS_PULL_UP:
- 		spin_lock_irqsave(&pctl->lock, flags);
+ 	for (i = 0; i < num_configs; i++) {
+ 		switch (pinconf_to_config_param(configs[i])) {
+ 		case PIN_CONFIG_DRIVE_STRENGTH:
+ 			strength = pinconf_to_config_argument(configs[i]);
+ 			if (strength > 40)
+ 				return -EINVAL;
+ 			/*
+ 			 * We convert from mA to what the register expects:
+ 			 *   0: 10mA
+ 			 *   1: 20mA
+ 			 *   2: 30mA
+ 			 *   3: 40mA
+ 			 */
+ 			dlevel = strength / 10 - 1;
++
++			spin_lock_irqsave(&pctl->lock, flags);
++
+ 			val = readl(pctl->membase + sunxi_dlevel_reg(g->pin));
+ 			mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(g->pin);
+ 			writel((val & ~mask)
+ 				| dlevel << sunxi_dlevel_offset(g->pin),
+ 				pctl->membase + sunxi_dlevel_reg(g->pin));
++
++			spin_unlock_irqrestore(&pctl->lock, flags);
+ 			break;
+ 		case PIN_CONFIG_BIAS_PULL_UP:
++			spin_lock_irqsave(&pctl->lock, flags);
 +
- 		val = readl(pctl->membase + sunxi_pull_reg(g->pin));
- 		mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
- 		writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin),
- 			pctl->membase + sunxi_pull_reg(g->pin));
+ 			val = readl(pctl->membase + sunxi_pull_reg(g->pin));
+ 			mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
+ 			writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin),
+ 				pctl->membase + sunxi_pull_reg(g->pin));
 +
- 		spin_unlock_irqrestore(&pctl->lock, flags);
- 		break;
- 	case PIN_CONFIG_BIAS_PULL_DOWN:
- 		spin_lock_irqsave(&pctl->lock, flags);
++			spin_unlock_irqrestore(&pctl->lock, flags);
+ 			break;
+ 		case PIN_CONFIG_BIAS_PULL_DOWN:
++			spin_lock_irqsave(&pctl->lock, flags);
 +
- 		val = readl(pctl->membase + sunxi_pull_reg(g->pin));
- 		mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
- 		writel((val & ~mask) | 2 << sunxi_pull_offset(g->pin),
- 			pctl->membase + sunxi_pull_reg(g->pin));
+ 			val = readl(pctl->membase + sunxi_pull_reg(g->pin));
+ 			mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
+ 			writel((val & ~mask) | 2 << sunxi_pull_offset(g->pin),
+ 				pctl->membase + sunxi_pull_reg(g->pin));
 +
- 		spin_unlock_irqrestore(&pctl->lock, flags);
- 		break;
- 	default:
- 		break;
- 	}
++			spin_unlock_irqrestore(&pctl->lock, flags);
+ 			break;
+ 		default:
+ 			break;
+ 		}
  
- 	/* cache the config value */
- 	g->config = config;
+ 		/* cache the config value */
+ 		g->config = configs[i];
+ 	} /* for each config */
  
  	return 0;
  }

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-08-29  7:17 linux-next: manual merge of the pinctrl tree with Linus' tree Stephen Rothwell
@ 2013-08-29  7:34 ` Linus Walleij
  2013-08-29  7:45 ` Linus Walleij
  1 sibling, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2013-08-29  7:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Maxime Ripard, Linus Walleij, Sherman Yin

On Thu, Aug 29, 2013 at 9:17 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Linus,
>
> Today's linux-next merge of the pinctrl tree got a conflict in
> drivers/pinctrl/pinctrl-sunxi.c between commit 1bee963db9dd ("pinctrl:
> sunxi: Add spinlocks") from Linus' tree and commit 03b054e9696c
> ("pinctrl: Pass all configs to driver on pin_config_set()") from the
> pinctrl tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

Hm yeah I think I should just merge in the latest -rc to smoothen
this over, as both conflicting patches come from my tree...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-08-29  7:17 linux-next: manual merge of the pinctrl tree with Linus' tree Stephen Rothwell
  2013-08-29  7:34 ` Linus Walleij
@ 2013-08-29  7:45 ` Linus Walleij
  2013-08-29 15:24   ` Sherman Yin
  1 sibling, 1 reply; 16+ messages in thread
From: Linus Walleij @ 2013-08-29  7:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Maxime Ripard, Linus Walleij, Sherman Yin

On Thu, Aug 29, 2013 at 9:17 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

I made a bit different fix, I just lock the spinlock around the entire
loop, as this is not doing any delays or anything like that and
just hammer a few registers with the settings, it makes sense to
have that inside a single lock:

--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@@ -282,48 -282,57 +283,51 @@@ static int sunxi_pconf_group_set(struc
        u32 val, mask;
        u16 strength;
        u8 dlevel;
 +      int i;

 -      switch (pinconf_to_config_param(config)) {
 -      case PIN_CONFIG_DRIVE_STRENGTH:
 -              strength = pinconf_to_config_argument(config);
 -              if (strength > 40)
 -                      return -EINVAL;
 -              /*
 -               * We convert from mA to what the register expects:
 -               *   0: 10mA
 -               *   1: 20mA
 -               *   2: 30mA
 -               *   3: 40mA
 -               */
 -              dlevel = strength / 10 - 1;
 -
 -              spin_lock_irqsave(&pctl->lock, flags);
 -
 -              val = readl(pctl->membase + sunxi_dlevel_reg(g->pin));
 -              mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(g->pin);
 -              writel((val & ~mask) | dlevel << sunxi_dlevel_offset(g->pin),
 -                      pctl->membase + sunxi_dlevel_reg(g->pin));
 -
 -              spin_unlock_irqrestore(&pctl->lock, flags);
 -              break;
 -      case PIN_CONFIG_BIAS_PULL_UP:
 -              spin_lock_irqsave(&pctl->lock, flags);
 -
 -              val = readl(pctl->membase + sunxi_pull_reg(g->pin));
 -              mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
 -              writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin),
 -                      pctl->membase + sunxi_pull_reg(g->pin));
 -
 -              spin_unlock_irqrestore(&pctl->lock, flags);
 -              break;
 -      case PIN_CONFIG_BIAS_PULL_DOWN:
 -              spin_lock_irqsave(&pctl->lock, flags);
 -
 -              val = readl(pctl->membase + sunxi_pull_reg(g->pin));
 -              mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
 -              writel((val & ~mask) | 2 << sunxi_pull_offset(g->pin),
 -                      pctl->membase + sunxi_pull_reg(g->pin));
++      spin_lock_irqsave(&pctl->lock, flags);
+
 -              spin_unlock_irqrestore(&pctl->lock, flags);
 -              break;
 -      default:
 -              break;
 -      }
 +      for (i = 0; i < num_configs; i++) {
 +              switch (pinconf_to_config_param(configs[i])) {
 +              case PIN_CONFIG_DRIVE_STRENGTH:
 +                      strength = pinconf_to_config_argument(configs[i]);
 +                      if (strength > 40)
 +                              return -EINVAL;
 +                      /*
 +                       * We convert from mA to what the register expects:
 +                       *   0: 10mA
 +                       *   1: 20mA
 +                       *   2: 30mA
 +                       *   3: 40mA
 +                       */
 +                      dlevel = strength / 10 - 1;
 +                      val = readl(pctl->membase + sunxi_dlevel_reg(g->pin));
 +                      mask = DLEVEL_PINS_MASK << sunxi_dlevel_offset(g->pin);
 +                      writel((val & ~mask)
 +                              | dlevel << sunxi_dlevel_offset(g->pin),
 +                              pctl->membase + sunxi_dlevel_reg(g->pin));
 +                      break;
 +              case PIN_CONFIG_BIAS_PULL_UP:
 +                      val = readl(pctl->membase + sunxi_pull_reg(g->pin));
 +                      mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
 +                      writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin),
 +                              pctl->membase + sunxi_pull_reg(g->pin));
 +                      break;
+              case PIN_CONFIG_BIAS_PULL_DOWN:
 +                      val = readl(pctl->membase + sunxi_pull_reg(g->pin));
 +                      mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
 +                      writel((val & ~mask) | 2 << sunxi_pull_offset(g->pin),
 +                              pctl->membase + sunxi_pull_reg(g->pin));
 +                      break;
 +              default:
 +                      break;
 +              }
-
 +              /* cache the config value */
 +              g->config = configs[i];
 +      } /* for each config */

 -      /* cache the config value */
 -      g->config = config;
++      spin_unlock_irqrestore(&pctl->lock, flags);
+
        return 0;
  }


Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-08-29  7:45 ` Linus Walleij
@ 2013-08-29 15:24   ` Sherman Yin
  2013-08-29 17:20     ` Linus Walleij
  0 siblings, 1 reply; 16+ messages in thread
From: Sherman Yin @ 2013-08-29 15:24 UTC (permalink / raw)
  To: Linus Walleij, Stephen Rothwell
  Cc: linux-next, linux-kernel, Maxime Ripard, Linus Walleij

>I made a bit different fix, I just lock the spinlock around the entire
>loop, as this is not doing any delays or anything like that and
>just hammer a few registers with the settings, it makes sense to
>have that inside a single lock:

Hmm, I fixed this the first time I ported over to LinusW's devel tree,
but when I rebased on Sunday, the spin lock commit seemed to be
reverted or gone.  

Note the following return in between the locking and unlocking -
need an unlock there?

> +              case PIN_CONFIG_DRIVE_STRENGTH:
> +                      strength = pinconf_to_config_argument(configs[i]);
> +                      if (strength > 40)
> +                              return -EINVAL;
> +                      /*
> +                       * We convert from mA to what the register expects:
> +                       *   0: 10mA
> +                       *   1: 20mA
> +                       *   2: 30mA
> +                       *   3: 40mA
> +                       */

Regards,
Sherman

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-08-29 15:24   ` Sherman Yin
@ 2013-08-29 17:20     ` Linus Walleij
  2013-08-29 17:21       ` Linus Walleij
  0 siblings, 1 reply; 16+ messages in thread
From: Linus Walleij @ 2013-08-29 17:20 UTC (permalink / raw)
  To: Sherman Yin
  Cc: Stephen Rothwell, linux-next, linux-kernel, Maxime Ripard, Linus Walleij

On Thu, Aug 29, 2013 at 5:24 PM, Sherman Yin <syin@broadcom.com> wrote:

> Hmm, I fixed this the first time I ported over to LinusW's devel tree,
> but when I rebased on Sunday, the spin lock commit seemed to be
> reverted or gone.

My pinctrl devel branch was branched off of v3.11-rc1, and the
spinlock changes were in some later -rc and I didn't merge
them in until now, because I thought they were orthogonal.

How wrong I was. So merged in -rc7 now and pushed, please
check the end result or linux-next.

> Note the following return in between the locking and unlocking -
> need an unlock there?
>
>> +              case PIN_CONFIG_DRIVE_STRENGTH:
>> +                      strength = pinconf_to_config_argument(configs[i]);
>> +                      if (strength > 40)
>> +                              return -EINVAL;

Argh. Send a patch with your reported-by tag...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-08-29 17:20     ` Linus Walleij
@ 2013-08-29 17:21       ` Linus Walleij
  0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2013-08-29 17:21 UTC (permalink / raw)
  To: Sherman Yin
  Cc: Stephen Rothwell, linux-next, linux-kernel, Maxime Ripard, Linus Walleij

On Thu, Aug 29, 2013 at 7:20 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

>> Note the following return in between the locking and unlocking -
>> need an unlock there?
>>
>>> +              case PIN_CONFIG_DRIVE_STRENGTH:
>>> +                      strength = pinconf_to_config_argument(configs[i]);
>>> +                      if (strength > 40)
>>> +                              return -EINVAL;
>
> Argh. Send a patch with your reported-by tag...

Not SEND, I mean SENT, I just SENT a patch...
subject "pinctrl: sunxi: drop lock on error path"
sorry for the confusion.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus'tree
@ 2013-12-13  4:02 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2013-12-13  4:02 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-next, linux-kernel, Laurent Pinchart

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
drivers/pinctrl/sh-pfc/pfc-sh7372.c between commit 71493de7e55a ("sh-pfc:
sh7372: Fix pin bias setup") from Linus' tree and commit 5b46ac3a7723
("sh-pfc: Rename sh_pfc window field to windows") from the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell <sfr@canb.auug.org.au>

diff --cc drivers/pinctrl/sh-pfc/pfc-sh7372.c
index cc097b693820,bcdd5c3cdcf0..000000000000
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@@ -2584,8 -2573,8 +2573,8 @@@ static void __iomem *sh7372_pinmux_port
  		const struct sh7372_portcr_group *group =
  			&sh7372_portcr_offsets[i];
  
 -		if (i <= group->end_pin)
 +		if (pin <= group->end_pin)
- 			return pfc->window->virt + group->offset + pin;
+ 			return pfc->windows->virt + group->offset + pin;
  	}
  
  	return NULL;

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2013-12-13  4:01 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2013-12-13  4:01 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-next, linux-kernel, Laurent Pinchart

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
drivers/pinctrl/sh-pfc/pfc-r8a7740.c between commit 5d27619498ab
("sh-pfc: r8a7740: Fix pin bias setup") from Linus' tree and commit
5b46ac3a7723 ("sh-pfc: Rename sh_pfc window field to windows") from the
pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell <sfr@canb.auug.org.au>

diff --cc drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index bc5eb453a45c,a189b962a1eb..000000000000
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@@ -3720,8 -3709,8 +3709,8 @@@ static void __iomem *r8a7740_pinmux_por
  		const struct r8a7740_portcr_group *group =
  			&r8a7740_portcr_offsets[i];
  
 -		if (i <= group->end_pin)
 +		if (pin <= group->end_pin)
- 			return pfc->window->virt + group->offset + pin;
+ 			return pfc->windows->virt + group->offset + pin;
  	}
  
  	return NULL;

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2013-06-17  6:11 Stephen Rothwell
@ 2013-06-17  7:09 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-06-17  7:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Walleij, linux-next, linux-kernel, Mugunthan V N,
	David Miller, netdev

On 06/17/2013 08:11 AM, Stephen Rothwell wrote:
> Hi Linus,

Hi Stephen,

> I fixed it up (see below) and can carry the fix as necessary (no
> action is required).

The fix looks good.

Sebastian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2013-06-17  6:11 Stephen Rothwell
  2013-06-17  7:09 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2013-06-17  6:11 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Mugunthan V N, Sebastian Siewior,
	David Miller, netdev

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
drivers/net/ethernet/ti/davinci_mdio.c between commit 2786aae7fc93
("net/ti davinci_mdio: don't hold a spin lock while calling pm_runtime")
from Linus' tree and commit 5c0e3580cb98 ("drivers: net: davinci_mdio:
use pinctrl PM helpers") from the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/ethernet/ti/davinci_mdio.c
index c47f0db,5e361f4..0000000
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@@ -449,22 -453,32 +453,28 @@@ static int davinci_mdio_suspend(struct 
  	__raw_writel(ctrl, &data->regs->control);
  	wait_for_idle(data);
  
 -	pm_runtime_put_sync(data->dev);
 -
  	data->suspended = true;
  	spin_unlock(&data->lock);
 +	pm_runtime_put_sync(data->dev);
  
+ 	/* Select sleep pin state */
+ 	pinctrl_pm_select_sleep_state(dev);
+ 
  	return 0;
  }
  
  static int davinci_mdio_resume(struct device *dev)
  {
  	struct davinci_mdio_data *data = dev_get_drvdata(dev);
 -	u32 ctrl;
  
+ 	/* Select default pin state */
+ 	pinctrl_pm_select_default_state(dev);
+ 
 -	spin_lock(&data->lock);
  	pm_runtime_get_sync(data->dev);
  
 +	spin_lock(&data->lock);
  	/* restart the scan state machine */
 -	ctrl = __raw_readl(&data->regs->control);
 -	ctrl |= CONTROL_ENABLE;
 -	__raw_writel(ctrl, &data->regs->control);
 +	__davinci_mdio_reset(data);
  
  	data->suspended = false;
  	spin_unlock(&data->lock);

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2012-10-12  3:30 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2012-10-12  3:30 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Jean-Christophe PLAGNIOL-VILLARD,
	David Woodhouse, Artem Bityutskiy

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
drivers/mtd/nand/atmel_nand.c between commit 28446acb1f82 ("mtd: atmel
nand: fix gpio missing request") from Linus' tree and commit 08695153170c
("MTD: atmel nand: fix gpio missing request") from the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/mtd/nand/atmel_nand.c
index 9144557,f48587b..0000000
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@@ -1414,12 -585,19 +1416,20 @@@ static int __init atmel_nand_probe(stru
  	nand_chip->IO_ADDR_W = host->io_base;
  	nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl;
  
+ 	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ 	if (IS_ERR(pinctrl)) {
+ 		dev_err(host->dev, "Failed to request pinctrl\n");
+ 		res = PTR_ERR(pinctrl);
+ 		goto err_ecc_ioremap;
+ 	}
+ 
  	if (gpio_is_valid(host->board.rdy_pin)) {
- 		res = gpio_request(host->board.rdy_pin, "nand_rdy");
+ 		res = devm_gpio_request(&pdev->dev,
+ 				host->board.rdy_pin, "nand_rdy");
  		if (res < 0) {
  			dev_err(&pdev->dev,
 -				"can't request rdy gpio %d\n", host->board.rdy_pin);
 +				"can't request rdy gpio %d\n",
 +				host->board.rdy_pin);
  			goto err_ecc_ioremap;
  		}
  
@@@ -1435,11 -612,11 +1444,12 @@@
  	}
  
  	if (gpio_is_valid(host->board.enable_pin)) {
- 		res = gpio_request(host->board.enable_pin, "nand_enable");
+ 		res = devm_gpio_request(&pdev->dev,
+ 				host->board.enable_pin, "nand_enable");
  		if (res < 0) {
  			dev_err(&pdev->dev,
 -				"can't request enable gpio %d\n", host->board.enable_pin);
 +				"can't request enable gpio %d\n",
 +				host->board.enable_pin);
  			goto err_ecc_ioremap;
  		}
  
@@@ -1465,11 -664,11 +1475,12 @@@
  	atmel_nand_enable(host);
  
  	if (gpio_is_valid(host->board.det_pin)) {
- 		res = gpio_request(host->board.det_pin, "nand_det");
+ 		res = devm_gpio_request(&pdev->dev,
+ 				host->board.det_pin, "nand_det");
  		if (res < 0) {
  			dev_err(&pdev->dev,
 -				"can't request det gpio %d\n", host->board.det_pin);
 +				"can't request det gpio %d\n",
 +				host->board.det_pin);
  			goto err_no_card;
  		}
  

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2012-10-12  3:08 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2012-10-12  3:08 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Nikolaus Voss, Wolfram Sang,
	Nicolas Ferre, Ludovic Desroches,
	Jean-Christophe PLAGNIOL-VILLARD

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in arch/arm/mach-at91/at91sam9x5.c between commits af2a5f09fb6d ("Replace clk_lookup.con_id with clk_lookup.dev_id entries for twi clk") and f7d19b906556 ("ARM: at91: add clocks for I2C DT entries") from Linus' tree and commit 5c70cd3c7c69 ("arm: at91: dt: at91sam9 add pinctrl support") from the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/arm/mach-at91/at91sam9x5.c
index e503538,79b5c52..0000000
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@@ -231,13 -231,10 +231,13 @@@ static struct clk_lookup periph_clocks_
  	CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
  	CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
  	CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
 +	CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
 +	CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
 +	CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk),
- 	CLKDEV_CON_ID("pioA", &pioAB_clk),
- 	CLKDEV_CON_ID("pioB", &pioAB_clk),
- 	CLKDEV_CON_ID("pioC", &pioCD_clk),
- 	CLKDEV_CON_ID("pioD", &pioCD_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCD_clk),
  	/* additional fake clock for macb_hclk */
  	CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk),
  	CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk),

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2012-10-12  3:01 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2012-10-12  3:01 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Ludovic Desroches, Wolfram Sang,
	Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
arch/arm/mach-at91/at91sam9263.c between commit f7d19b906556 ("ARM: at91:
add clocks for I2C DT entries") from Linus' tree and commit 5c70cd3c7c69
("arm: at91: dt: at91sam9 add pinctrl support") from the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/arm/mach-at91/at91sam9263.c
index 6a01d03,2edf813..0000000
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@@ -211,7 -210,11 +211,12 @@@ static struct clk_lookup periph_clocks_
  	CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk),
  	CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
  	CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
 +	CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk),
+ 	CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk),
  };
  
  static struct clk_lookup usart_clocks_lookups[] = {

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2012-10-12  2:56 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2012-10-12  2:56 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-next, linux-kernel, Ludovic Desroches, Wolfram Sang,
	Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got a conflict in
arch/arm/boot/dts/at91sam9g25ek.dts between commit fbc1871511ed ("ARM:
dts: add twi nodes for atmel boards") from Linus' tree and commit
77ccddbdc0c9 ("arm: at91: dt: at91sam9 add serial pinctrl support") from
the pinctrl tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/arm/boot/dts/at91sam9g25ek.dts
index 877c08f,c5ab16f..0000000
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@@ -13,49 -13,4 +13,20 @@@
  / {
  	model = "Atmel AT91SAM9G25-EK";
  	compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
 +
- 	chosen {
- 		bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
- 	};
- 
 +	ahb {
 +		apb {
- 			dbgu: serial@fffff200 {
- 				status = "okay";
- 			};
- 
- 			usart0: serial@f801c000 {
- 				status = "okay";
- 			};
- 
- 			macb0: ethernet@f802c000 {
- 				phy-mode = "rmii";
- 				status = "okay";
- 			};
- 
 +			i2c0: i2c@f8010000 {
 +				status = "okay";
 +			};
 +
 +			i2c1: i2c@f8014000 {
 +				status = "okay";
 +			};
 +
 +			i2c2: i2c@f8018000 {
 +				status = "okay";
 +			};
 +		};
- 
- 		usb0: ohci@00600000 {
- 			status = "okay";
- 			num-ports = <2>;
- 			atmel,vbus-gpio = <&pioD 19 1
- 					   &pioD 20 1
- 					  >;
- 		};
- 
- 		usb1: ehci@00700000 {
- 			status = "okay";
- 		};
 +	};
  };

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the pinctrl tree with Linus' tree
  2012-05-28  3:08 Stephen Rothwell
@ 2012-05-28 15:24 ` Linus Walleij
  0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2012-05-28 15:24 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

On Mon, May 28, 2012 at 11:08 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> <rant>So, if your tree/branch is merged into other trees, DO NOT REBASE
> IT.</rant>

Yeah gr, stupid me. I think I've fixed it up by basing the new stuff on
Torvalds' HEAD FTM, I dunno how I was thinking :-P

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the pinctrl tree with Linus' tree
@ 2012-05-28  3:08 Stephen Rothwell
  2012-05-28 15:24 ` Linus Walleij
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2012-05-28  3:08 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-next, linux-kernel

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

Hi Linus,

Today's linux-next merge of the pinctrl tree got conflicts in
Documentation/driver-model/devres.txt, drivers/pinctrl/Kconfig,
drivers/pinctrl/Makefile, and drivers/pinctrl/pinctrl-tegra.c between
various commits from Linus' tree and various commits from the pinctrl
tree.

The root cause of these conflicts is that the pinctrl tree was merged into
other trees that were meregd into Linus' tree (see commit 813a95e5b4fa on
May 23). Somewhere along the line the pinctrl tree was rebased/rewritten
(May 25 or so) and a new commit added to it.  Also there have been more
commits in Linus' tree that affect these files.

<rant>So, if your tree/branch is merged into other trees, DO NOT REBASE
IT.</rant>

I fixed it up (by using the versions of these files from Linus' tree -
and removing the call to pinctrl_remove_gpio_range()) and can carry the
fixes as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-13  4:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29  7:17 linux-next: manual merge of the pinctrl tree with Linus' tree Stephen Rothwell
2013-08-29  7:34 ` Linus Walleij
2013-08-29  7:45 ` Linus Walleij
2013-08-29 15:24   ` Sherman Yin
2013-08-29 17:20     ` Linus Walleij
2013-08-29 17:21       ` Linus Walleij
  -- strict thread matches above, loose matches on Subject: below --
2013-12-13  4:02 linux-next: manual merge of the pinctrl tree with Linus'tree Stephen Rothwell
2013-12-13  4:01 linux-next: manual merge of the pinctrl tree with Linus' tree Stephen Rothwell
2013-06-17  6:11 Stephen Rothwell
2013-06-17  7:09 ` Sebastian Andrzej Siewior
2012-10-12  3:30 Stephen Rothwell
2012-10-12  3:08 Stephen Rothwell
2012-10-12  3:01 Stephen Rothwell
2012-10-12  2:56 Stephen Rothwell
2012-05-28  3:08 Stephen Rothwell
2012-05-28 15:24 ` Linus Walleij

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).