public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: lee.jones@linaro•org (Lee Jones)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] mfd: mc13xxx: Configure WDI reset
Date: Mon, 8 Sep 2014 08:27:17 +0100	[thread overview]
Message-ID: <20140908072717.GH1397@lee--X1> (raw)
In-Reply-To: <1410159671-25873-1-git-send-email-mpa@pengutronix.de>

On Mon, 08 Sep 2014, Markus Pargmann wrote:

> Setup the PMIC to make a restart when a watchdog interrupt occures.
> If this is not configured, the PMIC will shut down the power supply
> without a restart.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix•de>
> ---
>  drivers/mfd/mc13xxx-core.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
> index 2b6bc868cd3d..64dde5d24b32 100644
> --- a/drivers/mfd/mc13xxx-core.c
> +++ b/drivers/mfd/mc13xxx-core.c
> @@ -36,6 +36,9 @@
>  #define MC34708_REVISION_FIN		(0x07 <<  6)
>  #define MC34708_REVISION_FAB		(0x07 <<  9)
>  
> +#define MC13XXX_PWRCTRL		15
> +#define MC13XXX_PWRCTRL_WDIRESET	(1 << 12)
> +
>  #define MC13XXX_ADC1		44
>  #define MC13XXX_ADC1_ADEN		(1 << 0)
>  #define MC13XXX_ADC1_RAND		(1 << 1)
> @@ -416,6 +419,11 @@ int mc13xxx_common_init(struct device *dev)
>  
>  	mc13xxx->variant->print_revision(mc13xxx, revision);
>  
> +	ret = mc13xxx_reg_rmw(mc13xxx, MC13XXX_PWRCTRL,
> +			MC13XXX_PWRCTRL_WDIRESET, MC13XXX_PWRCTRL_WDIRESET);
> +	if (ret)
> +		return ret;
> +
>  	for (i = 0; i < ARRAY_SIZE(mc13xxx->irqs); i++) {
>  		mc13xxx->irqs[i].reg_offset = i / MC13XXX_IRQ_PER_REG;
>  		mc13xxx->irqs[i].mask = BIT(i % MC13XXX_IRQ_PER_REG);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-09-08  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  7:01 [PATCH] mfd: mc13xxx: Configure WDI reset Markus Pargmann
2014-09-08  7:27 ` Lee Jones [this message]
2014-09-08  7:42 ` Philippe Rétornaz
2014-09-08  9:25   ` Markus Pargmann
2014-09-08 12:06     ` Philippe Rétornaz
2014-09-09  5:51       ` Markus Pargmann

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=20140908072717.GH1397@lee--X1 \
    --to=lee.jones@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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