linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Fabien Dessenne <fabien.dessenne@foss.st.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the pinctrl tree with the gpio-intel tree
Date: Mon, 2 May 2022 16:45:57 +1000	[thread overview]
Message-ID: <20220502164557.3cbb18ca@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the pinctrl tree got a conflict in:

  drivers/pinctrl/stm32/pinctrl-stm32.c

between commit:

  bb949ed9b16b ("pinctrl: stm32: Switch to use for_each_gpiochip_node() helper")

from the gpio-intel tree and commit:

  c954531bc5d8 ("pinctrl: stm32: improve bank clocks management")

from the pinctrl tree.

I fixed it up (I think, see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/pinctrl/stm32/pinctrl-stm32.c
index 7aecd0efde07,b308e7bb7487..000000000000
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@@ -1544,34 -1508,44 +1506,38 @@@ int stm32_pctl_probe(struct platform_de
  		return -ENOMEM;
  
  	i = 0;
 -	for_each_available_child_of_node(np, child) {
 +	for_each_gpiochip_node(dev, child) {
  		struct stm32_gpio_bank *bank = &pctl->banks[i];
 +		struct device_node *np = to_of_node(child);
  
 -		if (of_property_read_bool(child, "gpio-controller")) {
 -			bank->rstc = of_reset_control_get_exclusive(child,
 -								    NULL);
 -			if (PTR_ERR(bank->rstc) == -EPROBE_DEFER) {
 -				of_node_put(child);
 -				return -EPROBE_DEFER;
 -			}
 -
 -			bank->clk = of_clk_get_by_name(child, NULL);
 -			if (IS_ERR(bank->clk)) {
 -				if (PTR_ERR(bank->clk) != -EPROBE_DEFER)
 -					dev_err(dev,
 -						"failed to get clk (%ld)\n",
 -						PTR_ERR(bank->clk));
 -				of_node_put(child);
 -				return PTR_ERR(bank->clk);
 -			}
 -			i++;
 +		bank->rstc = of_reset_control_get_exclusive(np, NULL);
 +		if (PTR_ERR(bank->rstc) == -EPROBE_DEFER) {
 +			fwnode_handle_put(child);
 +			return -EPROBE_DEFER;
  		}
 -	}
  
 -	for_each_available_child_of_node(np, child) {
 -		if (of_property_read_bool(child, "gpio-controller")) {
 -			ret = stm32_gpiolib_register_bank(pctl, child);
 -			if (ret) {
 -				of_node_put(child);
 +		bank->clk = of_clk_get_by_name(np, NULL);
 +		if (IS_ERR(bank->clk)) {
 +			if (PTR_ERR(bank->clk) != -EPROBE_DEFER)
 +				dev_err(dev, "failed to get clk (%ld)\n", PTR_ERR(bank->clk));
 +			fwnode_handle_put(child);
 +			return PTR_ERR(bank->clk);
 +		}
 +		i++;
 +	}
  
 -				for (i = 0; i < pctl->nbanks; i++)
 -					clk_disable_unprepare(pctl->banks[i].clk);
 +	for_each_gpiochip_node(dev, child) {
 +		ret = stm32_gpiolib_register_bank(pctl, child);
 +		if (ret) {
 +			fwnode_handle_put(child);
+ 
 -				return ret;
 -			}
++			for (i = 0; i < pctl->nbanks; i++)
++				clk_disable_unprepare(pctl->banks[i].clk);
+ 
 -			pctl->nbanks++;
 +			return ret;
  		}
 +
 +		pctl->nbanks++;
  	}
  
  	dev_info(dev, "Pinctrl STM32 initialized\n");

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-05-02  6:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  6:45 Stephen Rothwell [this message]
2022-05-02 15:42 ` linux-next: manual merge of the pinctrl tree with the gpio-intel tree Andy Shevchenko
2022-05-04 21:18   ` Linus Walleij

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=20220502164557.3cbb18ca@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=fabien.dessenne@foss.st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.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).