[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdWRQmp=dNON2jWoT8yqjB1bc-bd0-W5tswY7ucDA6bvw@mail.gmail.com>
Date: Wed, 3 Aug 2022 13:32:47 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Colin Foster <colin.foster@...advantage.com>
Cc: linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Terry Bowman <terry.bowman@....com>,
Vladimir Oltean <vladimir.oltean@....com>,
Wolfram Sang <wsa@...nel.org>,
Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
Steen Hegelund <Steen.Hegelund@...rochip.com>,
Lars Povlsen <lars.povlsen@...rochip.com>,
Linus Walleij <linus.walleij@...aro.org>,
Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Russell King <linux@...linux.org.uk>,
Heiner Kallweit <hkallweit1@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Lee Jones <lee.jones@...aro.org>, katie.morris@...advantage.com
Subject: Re: [PATCH v15 mfd 6/9] pinctrl: microchip-sgpio: add ability to be
used in a non-mmio configuration
On Wed, Aug 3, 2022 at 7:47 AM Colin Foster
<colin.foster@...advantage.com> wrote:
>
> There are a few Ocelot chips that can contain SGPIO logic, but can be
> controlled externally. Specifically the VSC7511, 7512, 7513, and 7514. In
> the externally controlled configurations these registers are not
> memory-mapped.
>
> Add support for these non-memory-mapped configurations.
FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: Colin Foster <colin.foster@...advantage.com>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>
> (No changes since v14)
>
> v14
> * Add Reviewed and Acked tags
>
> ---
> drivers/pinctrl/pinctrl-microchip-sgpio.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c
> index e56074b7e659..2b4167a09b3b 100644
> --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c
> +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c
> @@ -12,6 +12,7 @@
> #include <linux/clk.h>
> #include <linux/gpio/driver.h>
> #include <linux/io.h>
> +#include <linux/mfd/ocelot.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/pinctrl/pinmux.h>
> @@ -904,7 +905,6 @@ static int microchip_sgpio_probe(struct platform_device *pdev)
> struct reset_control *reset;
> struct sgpio_priv *priv;
> struct clk *clk;
> - u32 __iomem *regs;
> u32 val;
> struct regmap_config regmap_config = {
> .reg_bits = 32,
> @@ -937,11 +937,7 @@ static int microchip_sgpio_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> - regs = devm_platform_ioremap_resource(pdev, 0);
> - if (IS_ERR(regs))
> - return PTR_ERR(regs);
> -
> - priv->regs = devm_regmap_init_mmio(dev, regs, ®map_config);
> + priv->regs = ocelot_regmap_from_resource(pdev, 0, ®map_config);
> if (IS_ERR(priv->regs))
> return PTR_ERR(priv->regs);
>
> --
> 2.25.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists