All of lore.kernel.org
 help / color / mirror / Atom feed
From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linus.walleij@linaro.org>, <colin.foster@in-advantage.com>,
	<andriy.shevchenko@linux.intel.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource.
Date: Fri, 4 Mar 2022 15:44:31 +0100	[thread overview]
Message-ID: <20220304144432.3397621-2-horatiu.vultur@microchip.com> (raw)
In-Reply-To: <20220304144432.3397621-1-horatiu.vultur@microchip.com>

The pincfg resources are in the second memory resource. But the driver
still tries to access the first memory resource to get the pincfg. This
is wrong therefore fix to access the second memory resource.

Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/pinctrl/pinctrl-ocelot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 685c79e08d40..a859fbcb09af 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1892,7 +1892,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
 		.max_register = 32,
 	};
 
-	base = devm_platform_ioremap_resource(pdev, 0);
+	base = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(base)) {
 		dev_dbg(&pdev->dev, "Failed to ioremap config registers (no extended pinconf)\n");
 		return NULL;
-- 
2.33.0


  reply	other threads:[~2022-03-04 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 14:44 [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-03-04 14:44 ` Horatiu Vultur [this message]
2022-03-07 12:45   ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Michael Walle
2022-03-08  8:30     ` Horatiu Vultur
2022-03-08  8:31       ` Michael Walle
2022-03-15  0:51         ` Linus Walleij
2022-03-04 14:44 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
2022-03-15  0:52   ` 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=20220304144432.3397621-2-horatiu.vultur@microchip.com \
    --to=horatiu.vultur@microchip.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=colin.foster@in-advantage.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@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 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.