[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140528161115.GB22194@roeck-us.net>
Date: Wed, 28 May 2014 09:11:15 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Tord Andersson <tord.o.andersson@...il.com>
Cc: Wim Van Sebroeck <wim@...ana.be>, linux-watchdog@...r.kernel.org,
linux-kernel@...r.kernel.org,
Tord Andersson <tord.andersson@...ian.se>
Subject: Re: [PATCH 1/1] watchdog: imx2: Added ioctl options to
enable/disable watchdog as wanted by systemd.
On Wed, May 28, 2014 at 04:59:56PM +0200, Tord Andersson wrote:
> When the current imx2 watchdog driver is used with the systemd watchdog feature,
> we get "Failed to enable hardware watchdog: Inappropriate ioctl for device".
> This is caused by missing ioctl setoptions to enable the watchdog.
> This patch will add WDIOC_SETOPTIONS for WDIOS_ENABLECARD and WDIOS_DISABLECARD.
>
> Signed-off-by: Tord Andersson <tord.andersson@...ian.se>
> ---
Hi Tord,
This driver is in the process of being concerted to use the watchdog
core API. See 'watchdog: imx2_wdt: convert to watchdog core api' [1]
from Anatolij Gustschin.
With this update, this patch becomes unnecessary.
Guenter
[1] http://patchwork.roeck-us.net/patch/1340/
> drivers/watchdog/imx2_wdt.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index dd51d95..180c6a5 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -196,6 +196,17 @@ static long imx2_wdt_ioctl(struct file *file, unsigned int cmd,
> new_value = val & IMX2_WDT_WRSR_TOUT ? WDIOF_CARDRESET : 0;
> return put_user(new_value, p);
>
> + case WDIOC_SETOPTIONS:
> + if (get_user(new_value, p))
> + return -EFAULT;
> + if (new_value & WDIOS_ENABLECARD)
> + imx2_wdt_start();
> + else if (new_value & WDIOS_DISABLECARD)
> + imx2_wdt_stop();
> + else
> + return -EINVAL;
> + return 0;
> +
> case WDIOC_KEEPALIVE:
> imx2_wdt_ping();
> return 0;
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists