mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	<tzungbi@kernel.org>,
	Linux Watchdog Mailing List <linux-watchdog@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Phil Edworthy <phil.edworthy@renesas.com>
Subject: Re: [PATCH v6 2/2] watchdog: Add Renesas RZ/N1 Watchdog driver
Date: Wed, 27 Apr 2022 15:33:44 +0200	[thread overview]
Message-ID: <fc42f228-9fbc-be0d-7585-71c5a908c125@traphandler.com> (raw)
In-Reply-To: <CAMuHMdXLpuoTiOn7yDwTTnjkqWJ4PXuhdCLiLcOP2uyzyV6==A@mail.gmail.com>


On 27/04/2022 14:32, Geert Uytterhoeven wrote:
> Hi Jean-Jacques,
>
> On Wed, Apr 13, 2022 at 10:25 AM Jean-Jacques Hiblot
> <jjhiblot@traphandler.com> wrote:
>> From: Phil Edworthy <phil.edworthy@renesas.com>
>>
>> This is a driver for the standard WDT on the RZ/N1 devices. This WDT has
>> very limited timeout capabilities. However, it can reset the device.
>> To do so, the corresponding bits in the SysCtrl RSTEN register need to
>> be enabled. This is not done by this driver.
>>
>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
> Thanks for your patch!
>
>> --- /dev/null
>> +++ b/drivers/watchdog/rzn1_wdt.c
>> +static int rzn1_wdt_probe(struct platform_device *pdev)
>> +{
>> +       struct device *dev = &pdev->dev;
>> +       struct rzn1_watchdog *wdt;
>> +       struct device_node *np = dev->of_node;
>> +       struct clk *clk;
>> +       int ret;
>> +       int irq;
>> +
>> +       wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
>> +       if (!wdt)
>> +               return -ENOMEM;
>> +
>> +       wdt->base = devm_platform_ioremap_resource(pdev, 0);
>> +       if (IS_ERR(wdt->base))
>> +               return PTR_ERR(wdt->base);
>> +
>> +       irq = platform_get_irq(pdev, 0);
>> +       if (irq < 0)
>> +               return irq;
>> +
>> +       ret = devm_request_irq(dev, irq, rzn1_wdt_irq, 0,
>> +                              np->name, wdt);
>> +       if (ret) {
>> +               dev_err(dev, "failed to request irq %d\n", irq);
>> +               return ret;
>> +       }
>> +
>> +       clk = devm_clk_get(dev, NULL);
>> +       if (IS_ERR(clk)) {
>> +               dev_err(dev, "failed to get the clock\n");
>> +               return PTR_ERR(clk);
>> +       }
>> +
>> +       ret = clk_prepare_enable(clk);
>> +       if (ret) {
>> +               dev_err(dev, "failed to prepare/enable the clock\n");
>> +               return ret;
>> +       }
>> +
>> +       ret = devm_add_action_or_reset(dev, rzn1_wdt_clk_disable_unprepare,
>> +                                      clk);
>> +       if (ret) {
>> +               dev_err(dev, "failed to register clock unprepare callback\n");
> Please remove this error message.
> devm_add_action_or_reset() only fails when running out of memory,
> in which case the memory allocation core has already printed an
> error message.

OK. I'll remove this.

Thanks,

JJ

>
>> +               return ret;
>> +       }
> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds

  reply	other threads:[~2022-04-27 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  8:25 [PATCH v6 0/2] ARM: r9a06g032: add support for the watchdogs Jean-Jacques Hiblot
2022-04-13  8:25 ` [PATCH v6 1/2] dt-bindings: watchdog: renesas,wdt: Add support for RZ/N1 Jean-Jacques Hiblot
2022-04-13  8:25 ` [PATCH v6 2/2] watchdog: Add Renesas RZ/N1 Watchdog driver Jean-Jacques Hiblot
2022-04-27 12:32   ` Geert Uytterhoeven
2022-04-27 13:33     ` Jean-Jacques Hiblot [this message]
2022-04-27 13:03   ` Guenter Roeck
2022-04-27 13:36     ` Jean-Jacques Hiblot

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=fc42f228-9fbc-be0d-7585-71c5a908c125@traphandler.com \
    --to=jjhiblot@traphandler.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=phil.edworthy@renesas.com \
    --cc=tzungbi@kernel.org \
    --cc=wim@linux-watchdog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®