From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Andrew Lunn <andrew@lunn.ch>,
Ralph Sennhauser <ralph.sennhauser@gmail.com>,
linux-gpio@vger.kernel.org, stable@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH] gpio: mvebu: only fail on missing clk if pwm is actually to be used
Date: Mon, 17 Dec 2018 09:46:54 +0100 [thread overview]
Message-ID: <875zvsk0ap.fsf@bootlin.com> (raw)
In-Reply-To: <20181217084313.15379-1-u.kleine-koenig@pengutronix.de> ("Uwe Kleine-König"'s message of "Mon, 17 Dec 2018 09:43:13 +0100")
Hi,
On lun., déc. 17 2018, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
> registers. So there is no need for a clk as the pwm isn't used anyhow.
> So only check for the clk in the presence of the pwm registers. This fixes
> a failure to probe the gpio driver for the above mentioned gpio device.
>
> Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Thanks,
Gregory
> ---
> drivers/gpio/gpio-mvebu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 6e02148c208b..adc768f908f1 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -773,9 +773,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
> "marvell,armada-370-gpio"))
> return 0;
>
> - if (IS_ERR(mvchip->clk))
> - return PTR_ERR(mvchip->clk);
> -
> /*
> * There are only two sets of PWM configuration registers for
> * all the GPIO lines on those SoCs which this driver reserves
> @@ -786,6 +783,9 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
> if (!res)
> return 0;
>
> + if (IS_ERR(mvchip->clk))
> + return PTR_ERR(mvchip->clk);
> +
> /*
> * Use set A for lines of GPIO chip with id 0, B for GPIO chip
> * with id 1. Don't allow further GPIO chips to be used for PWM.
> --
> 2.19.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Linus Walleij <linus.walleij@linaro.org>,
stable@vger.kernel.org, linux-gpio@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>,
kernel@pengutronix.de,
Ralph Sennhauser <ralph.sennhauser@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] gpio: mvebu: only fail on missing clk if pwm is actually to be used
Date: Mon, 17 Dec 2018 09:46:54 +0100 [thread overview]
Message-ID: <875zvsk0ap.fsf@bootlin.com> (raw)
In-Reply-To: <20181217084313.15379-1-u.kleine-koenig@pengutronix.de> ("Uwe Kleine-König"'s message of "Mon, 17 Dec 2018 09:43:13 +0100")
Hi,
On lun., déc. 17 2018, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
> registers. So there is no need for a clk as the pwm isn't used anyhow.
> So only check for the clk in the presence of the pwm registers. This fixes
> a failure to probe the gpio driver for the above mentioned gpio device.
>
> Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Thanks,
Gregory
> ---
> drivers/gpio/gpio-mvebu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 6e02148c208b..adc768f908f1 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -773,9 +773,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
> "marvell,armada-370-gpio"))
> return 0;
>
> - if (IS_ERR(mvchip->clk))
> - return PTR_ERR(mvchip->clk);
> -
> /*
> * There are only two sets of PWM configuration registers for
> * all the GPIO lines on those SoCs which this driver reserves
> @@ -786,6 +783,9 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
> if (!res)
> return 0;
>
> + if (IS_ERR(mvchip->clk))
> + return PTR_ERR(mvchip->clk);
> +
> /*
> * Use set A for lines of GPIO chip with id 0, B for GPIO chip
> * with id 1. Don't allow further GPIO chips to be used for PWM.
> --
> 2.19.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-17 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 8:43 [PATCH] gpio: mvebu: only fail on missing clk if pwm is actually to be used Uwe Kleine-König
2018-12-17 8:43 ` Uwe Kleine-König
2018-12-17 8:46 ` Gregory CLEMENT [this message]
2018-12-17 8:46 ` Gregory CLEMENT
2018-12-17 14:25 ` Linus Walleij
2018-12-17 14:25 ` 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=875zvsk0ap.fsf@bootlin.com \
--to=gregory.clement@bootlin.com \
--cc=andrew@lunn.ch \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=ralph.sennhauser@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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.