mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1 2/3] watchdog: add (U)EFI watchdog driver
Date: Mon, 11 Feb 2019 08:51:11 +0100	[thread overview]
Message-ID: <20190211075111.3nkxyejnpzrqh3gh@pengutronix.de> (raw)
In-Reply-To: <20190207095625.11582-2-o.rempel@pengutronix.de>

On Thu, Feb 07, 2019 at 10:56:24AM +0100, Oleksij Rempel wrote:
> This driver is using SetWatchdogTimer() UEFI interface and was
> tested on iBASE MI991AF Mini-ITX motherboard.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  common/efi/efi.c           |  9 ++++-
>  drivers/watchdog/Kconfig   |  6 ++++
>  drivers/watchdog/Makefile  |  1 +
>  drivers/watchdog/efi_wdt.c | 69 ++++++++++++++++++++++++++++++++++++++
>  4 files changed, 84 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/watchdog/efi_wdt.c
> 
> +#define to_efi_wdt(h) container_of(h, struct efi_wdt_priv, wd)
> +
> +static int efi_wdt_set_timeout(struct watchdog *wd, unsigned timeout)
> +{
> +	struct efi_wdt_priv *priv = to_efi_wdt(wd);
> +	efi_status_t efiret;
> +
> +	efiret = BS->set_watchdog_timer(timeout, 0, 0, NULL);
> +	if (EFI_ERROR(efiret))
> +		dev_err(priv->dev, "filed to set EFI watchdog: %lx\n", efiret);

Shouldn't you return an error here?

> +	.name = "efi-wdt",
> +	.probe = efi_wdt_probe,
> +};
> +
> +static int efi_wdt_initcall(void)
> +{
> +	return platform_driver_register(&efi_wdt_driver);
> +}
> +device_initcall(efi_wdt_initcall);

device_platform_driver instead?

Sascha


-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-11  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  9:56 [PATCH v1 1/3] efi: add prototype and definition for set_watchdog_timer Oleksij Rempel
2019-02-07  9:56 ` [PATCH v1 2/3] watchdog: add (U)EFI watchdog driver Oleksij Rempel
2019-02-11  7:51   ` Sascha Hauer [this message]
2019-02-07  9:56 ` [PATCH v1 3/3] EFI: add watchdog support Oleksij Rempel

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=20190211075111.3nkxyejnpzrqh3gh@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.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