All of lore.kernel.org
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] pinctrl: at91: fix clk_unprepare and clk_disable order
Date: Mon, 16 Dec 2013 10:56:55 +0100	[thread overview]
Message-ID: <52AECE67.6050507@atmel.com> (raw)
In-Reply-To: <1387132252-2584-2-git-send-email-b.brezillon@overkiz.com>

On 15/12/2013 19:30, Boris BREZILLON :
> clk_unprepare shall be called before clk_disable.
> Fix the issue by replacing the clk_unprepare and clk_disable calls by a
> single clk_disable_unprepare call.
> 
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks.

> ---
>  drivers/pinctrl/pinctrl-at91.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index a7549c4..82f6301 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1339,13 +1339,11 @@ void at91_pinctrl_gpio_suspend(void)
>  		__raw_writel(backups[i], pio + PIO_IDR);
>  		__raw_writel(wakeups[i], pio + PIO_IER);
>  
> -		if (!wakeups[i]) {
> -			clk_unprepare(gpio_chips[i]->clock);
> -			clk_disable(gpio_chips[i]->clock);
> -		} else {
> +		if (!wakeups[i])
> +			clk_disable_unprepare(gpio_chips[i]->clock);
> +		else
>  			printk(KERN_DEBUG "GPIO-%c may wake for %08x\n",
>  			       'A'+i, wakeups[i]);
> -		}
>  	}
>  }
>  
> 


-- 
Nicolas Ferre

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris BREZILLON <b.brezillon@overkiz.com>,
	"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] pinctrl: at91: fix clk_unprepare and clk_disable order
Date: Mon, 16 Dec 2013 10:56:55 +0100	[thread overview]
Message-ID: <52AECE67.6050507@atmel.com> (raw)
In-Reply-To: <1387132252-2584-2-git-send-email-b.brezillon@overkiz.com>

On 15/12/2013 19:30, Boris BREZILLON :
> clk_unprepare shall be called before clk_disable.
> Fix the issue by replacing the clk_unprepare and clk_disable calls by a
> single clk_disable_unprepare call.
> 
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks.

> ---
>  drivers/pinctrl/pinctrl-at91.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index a7549c4..82f6301 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1339,13 +1339,11 @@ void at91_pinctrl_gpio_suspend(void)
>  		__raw_writel(backups[i], pio + PIO_IDR);
>  		__raw_writel(wakeups[i], pio + PIO_IER);
>  
> -		if (!wakeups[i]) {
> -			clk_unprepare(gpio_chips[i]->clock);
> -			clk_disable(gpio_chips[i]->clock);
> -		} else {
> +		if (!wakeups[i])
> +			clk_disable_unprepare(gpio_chips[i]->clock);
> +		else
>  			printk(KERN_DEBUG "GPIO-%c may wake for %08x\n",
>  			       'A'+i, wakeups[i]);
> -		}
>  	}
>  }
>  
> 


-- 
Nicolas Ferre

  reply	other threads:[~2013-12-16  9:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 18:30 [PATCH 0/2] pinctrl: at91: fix clk handling in suspend/resume funcs Boris BREZILLON
2013-12-15 18:30 ` Boris BREZILLON
2013-12-15 18:30 ` [PATCH 1/2] pinctrl: at91: fix clk_unprepare and clk_disable order Boris BREZILLON
2013-12-15 18:30   ` Boris BREZILLON
2013-12-16  9:56   ` Nicolas Ferre [this message]
2013-12-16  9:56     ` Nicolas Ferre
2013-12-16 13:22   ` Linus Walleij
2013-12-16 13:22     ` Linus Walleij
2013-12-15 18:30 ` [PATCH 2/2] pinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable Boris BREZILLON
2013-12-15 18:30   ` Boris BREZILLON
2013-12-16  9:57   ` Nicolas Ferre
2013-12-16  9:57     ` Nicolas Ferre
2013-12-16 13:23   ` Linus Walleij
2013-12-16 13:23     ` 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=52AECE67.6050507@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.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.