mbox series

[0/2] pinctrl: ocelot: Add fixes for ocelot driver

Message ID 20220303203716.3012703-1-horatiu.vultur@microchip.com
Headers show
Series pinctrl: ocelot: Add fixes for ocelot driver | expand

Message

Horatiu Vultur March 3, 2022, 8:37 p.m. UTC
This contains two fixes for the ocelot pinctrl:
- first fixes the memory resource index for pincfg
- second fixes the interrupt parsing

Horatiu Vultur (2):
  pinctrl: ocelot: Fix the pincfg resource.
  pinctrl: ocelot: Fix interrupt parsing

 drivers/pinctrl/pinctrl-ocelot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Colin Foster March 3, 2022, 9:28 p.m. UTC | #1
Hi Horatiu,

On Thu, Mar 03, 2022 at 09:37:15PM +0100, Horatiu Vultur wrote:
> 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.
> 
> Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")

Sorry for this bug, but thanks for finding / fixing it. Digging through
my commit log to make sure I didn't make the same mistake a _third_ time
:(

For what it's worth:

Reviewed-by: Colin Foster <colin.foster@in-advantage.com>

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