From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Michael Walle <michael@walle.cc>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
<linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] pinctrl: ocelot: add optional shared reset
Date: Wed, 20 Apr 2022 08:21:34 +0200 [thread overview]
Message-ID: <20220420062134.4cyux7sz5xyyg6mr@soft-dev3-1.localhost> (raw)
In-Reply-To: <20220419230324.3221779-3-michael@walle.cc>
The 04/20/2022 01:03, Michael Walle wrote:
Hi Michael,
>
> On the LAN9668 there is a shared reset line which affects GPIO, SGPIO
> and the switch core. Add support for this shared reset line.
I have just a small comment below. Otherwise:
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> drivers/pinctrl/pinctrl-ocelot.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
> index 1bdced67464b..b25eb04e4e1d 100644
> --- a/drivers/pinctrl/pinctrl-ocelot.c
> +++ b/drivers/pinctrl/pinctrl-ocelot.c
> @@ -19,6 +19,7 @@
> #include <linux/pinctrl/pinconf-generic.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> +#include <linux/reset.h>
> #include <linux/slab.h>
>
> #include "core.h"
> @@ -1912,6 +1913,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct ocelot_pinctrl *info;
> + struct reset_control *reset;
> struct regmap *pincfg;
> void __iomem *base;
> int ret;
> @@ -1927,6 +1929,13 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
>
> info->desc = (struct pinctrl_desc *)device_get_match_data(dev);
>
> + reset = devm_reset_control_get_optional_shared(dev, "switch");
> + if (IS_ERR(reset)) {
> + dev_err(dev, "Failed to get reset\n");
> + return PTR_ERR(reset);
Can you use dev_err_probe here?
> + }
> + reset_control_reset(reset);
> +
> base = devm_ioremap_resource(dev,
> platform_get_resource(pdev, IORESOURCE_MEM, 0));
> if (IS_ERR(base))
> --
> 2.30.2
>
--
/Horatiu
next prev parent reply other threads:[~2022-04-20 6:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 23:03 [PATCH v2 0/2] pinctrl: ocelot: add shared reset Michael Walle
2022-04-19 23:03 ` [PATCH v2 1/2] dt-bindings: pinctrl: ocelot: add reset property Michael Walle
2022-04-19 23:03 ` [PATCH v2 2/2] pinctrl: ocelot: add optional shared reset Michael Walle
2022-04-20 6:21 ` Horatiu Vultur [this message]
2022-04-28 22:37 ` [PATCH v2 0/2] pinctrl: ocelot: add " 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=20220420062134.4cyux7sz5xyyg6mr@soft-dev3-1.localhost \
--to=horatiu.vultur@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=lars.povlsen@microchip.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@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