From: Thierry Reding <thierry.reding@gmail.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: robh+dt@kernel.org, swarren@wwwdotorg.org, gnurou@gmail.com,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Rohith Seelaboyina <rseelaboyina@nvidia.com>
Subject: Re: [PATCH 1/5] pwm: tegra: Add support for reset control
Date: Wed, 22 Jun 2016 14:40:19 +0200 [thread overview]
Message-ID: <20160622124019.GF26943@ulmo.ba.sec> (raw)
In-Reply-To: <1466596043-27262-2-git-send-email-ldewangan@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
On Wed, Jun 22, 2016 at 05:17:19PM +0530, Laxman Dewangan wrote:
> From: Rohith Seelaboyina <rseelaboyina@nvidia.com>
>
> Add reset control of the PWM controller to reset it before
> accessing the PWM register.
>
> Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
> drivers/pwm/pwm-tegra.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
> index d4de060..71b9c4d 100644
> --- a/drivers/pwm/pwm-tegra.c
> +++ b/drivers/pwm/pwm-tegra.c
> @@ -29,6 +29,7 @@
> #include <linux/pwm.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> +#include <linux/reset.h>
>
> #define PWM_ENABLE (1 << 31)
> #define PWM_DUTY_WIDTH 8
> @@ -43,6 +44,7 @@ struct tegra_pwm_chip {
> struct device *dev;
>
> struct clk *clk;
> + struct reset_control *rstc;
Drop the 'c' at the end, for consistency with other drivers.
>
> void __iomem *mmio_base;
> };
> @@ -189,6 +191,14 @@ static int tegra_pwm_probe(struct platform_device *pdev)
> if (IS_ERR(pwm->clk))
> return PTR_ERR(pwm->clk);
>
> + pwm->rstc = devm_reset_control_get(&pdev->dev, "pwm");
> + if (IS_ERR(pwm->rstc)) {
> + ret = PTR_ERR(pwm->rstc);
> + dev_err(&pdev->dev, "Reset control is not found: %d\n", ret);
> + return ret;
> + }
> + reset_control_reset(pwm->rstc);
I think you want reset_control_deassert() here and the call its counter-
part, reset_control_assert(), in tegra_pwm_remove().
No particular need to respin, I can make those changes when I apply.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-22 12:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 11:47 [PATCH 0/5] pwm: Fixes and support for Tegra186 Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
2016-06-22 11:47 ` [PATCH 1/5] pwm: tegra: Add support for reset control Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
2016-06-22 12:40 ` Thierry Reding [this message]
2016-06-22 11:47 ` [PATCH 2/5] pwm: tegra: Allow 100% duty cycle Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
2016-06-22 11:47 ` [PATCH 3/5] pwm: tegra: fix overflow when calculating " Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
2016-06-22 11:47 ` [PATCH 4/5] pwm: tegra: Add DT node compatible for Tegra186 Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
2016-06-22 12:46 ` Thierry Reding
[not found] ` <20160622124614.GG26943-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-06-24 16:10 ` Rob Herring
2016-06-24 16:10 ` Rob Herring
2016-06-24 21:30 ` Stephen Warren
[not found] ` <1466596043-27262-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-22 11:47 ` [PATCH 5/5] pwm: tegra: Add support " Laxman Dewangan
2016-06-22 11:47 ` Laxman Dewangan
[not found] ` <1466596043-27262-6-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-30 9:15 ` Alexandre Courbot
2016-06-30 9:15 ` Alexandre Courbot
2016-07-11 9:31 ` [PATCH 0/5] pwm: Fixes and " Thierry Reding
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=20160622124019.GF26943@ulmo.ba.sec \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rseelaboyina@nvidia.com \
--cc=swarren@wwwdotorg.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.