From: Sascha Hauer <s.hauer@pengutronix.de>
To: Axel Lin <axel.lin@ingics.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] pwm: imx: Remove enabled field from struct imx_chip
Date: Tue, 2 Apr 2013 10:13:09 +0200 [thread overview]
Message-ID: <20130402081309.GL1906@pengutronix.de> (raw)
In-Reply-To: <1364741987.3834.2.camel@phoenix>
On Sun, Mar 31, 2013 at 10:59:47PM +0800, Axel Lin wrote:
> We can test PWMF_ENABLED bit to know if pwm is enabled or not.
> Thus remove enabled field from struct imx_chip.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Looks good.
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
> ---
> drivers/pwm/pwm-imx.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
> index 3f5677b..ec28798 100644
> --- a/drivers/pwm/pwm-imx.c
> +++ b/drivers/pwm/pwm-imx.c
> @@ -43,7 +43,6 @@ struct imx_chip {
> struct clk *clk_per;
> struct clk *clk_ipg;
>
> - int enabled;
> void __iomem *mmio_base;
>
> struct pwm_chip chip;
> @@ -135,7 +134,7 @@ static int imx_pwm_config_v2(struct pwm_chip *chip,
> MX3_PWMCR_DOZEEN | MX3_PWMCR_WAITEN |
> MX3_PWMCR_DBGEN | MX3_PWMCR_CLKSRC_IPG_HIGH;
>
> - if (imx->enabled)
> + if (test_bit(PWMF_ENABLED, &pwm->flags))
> cr |= MX3_PWMCR_EN;
>
> writel(cr, imx->mmio_base + MX3_PWMCR);
> @@ -186,8 +185,6 @@ static int imx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
>
> imx->set_enable(chip, true);
>
> - imx->enabled = 1;
> -
> return 0;
> }
>
> @@ -198,7 +195,6 @@ static void imx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
> imx->set_enable(chip, false);
>
> clk_disable_unprepare(imx->clk_per);
> - imx->enabled = 0;
> }
>
> static struct pwm_ops imx_pwm_ops = {
> --
> 1.7.10.4
>
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2013-04-02 8:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-31 14:59 Axel Lin
2013-03-31 15:01 ` [PATCH 2/3] pwm: puv3: Remove unused enabled filed from struct puv3_pwm_chip Axel Lin
2013-03-31 15:04 ` [PATCH 3/3] pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chip Axel Lin
2013-04-01 7:24 ` Eric Miao
2013-04-01 7:32 ` Axel Lin
2013-04-01 7:35 ` Eric Miao
2013-04-02 8:13 ` Sascha Hauer [this message]
2013-04-02 9:37 ` [PATCH 1/3] pwm: imx: Remove enabled field from struct imx_chip 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=20130402081309.GL1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=axel.lin@ingics.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@avionic-design.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome