From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Josh Wu <josh.wu@atmel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock
Date: Sat, 13 Sep 2014 12:59:14 +0200 [thread overview]
Message-ID: <20140913105914.GD26281@piout.net> (raw)
In-Reply-To: <CAAEAJfD_Kujcf7m9RAbRrjA82A08N81rVwy6sXY_PORdrH0VkA@mail.gmail.com>
Hi,
On 13/09/2014 at 10:26:18 +0100, Ezequiel Garcia wrote :
> > + nfc->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (!IS_ERR(nfc->clk)) {
> > + ret = clk_prepare_enable(nfc->clk);
> > + if (ret)
> > + return ret;
> > + } else {
> > + dev_warn(&pdev->dev, "NFC clock missing, update your Device Tree");
>
> Looks much better now thanks. If the clock is not really optional, you
> can consider this a firmware bug. We've used FW_BUG messages for these
> cases
> (see vim drivers/watchdog/orion_wdt.c), so you could write something like:
>
> dev_warn(..., FW_BUG "devicetree clock missing");
>
Yeah, I've considered using FW_WARN like Thomas suggested but I'm not
sure it really relates to device tree. Apart from x86, FW_WARN and
FW_BUG are only used on mvebu stuff ;)
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock
Date: Sat, 13 Sep 2014 12:59:14 +0200 [thread overview]
Message-ID: <20140913105914.GD26281@piout.net> (raw)
In-Reply-To: <CAAEAJfD_Kujcf7m9RAbRrjA82A08N81rVwy6sXY_PORdrH0VkA@mail.gmail.com>
Hi,
On 13/09/2014 at 10:26:18 +0100, Ezequiel Garcia wrote :
> > + nfc->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (!IS_ERR(nfc->clk)) {
> > + ret = clk_prepare_enable(nfc->clk);
> > + if (ret)
> > + return ret;
> > + } else {
> > + dev_warn(&pdev->dev, "NFC clock missing, update your Device Tree");
>
> Looks much better now thanks. If the clock is not really optional, you
> can consider this a firmware bug. We've used FW_BUG messages for these
> cases
> (see vim drivers/watchdog/orion_wdt.c), so you could write something like:
>
> dev_warn(..., FW_BUG "devicetree clock missing");
>
Yeah, I've considered using FW_WARN like Thomas suggested but I'm not
sure it really relates to device tree. Apart from x86, FW_WARN and
FW_BUG are only used on mvebu stuff ;)
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Josh Wu <josh.wu@atmel.com>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock
Date: Sat, 13 Sep 2014 12:59:14 +0200 [thread overview]
Message-ID: <20140913105914.GD26281@piout.net> (raw)
In-Reply-To: <CAAEAJfD_Kujcf7m9RAbRrjA82A08N81rVwy6sXY_PORdrH0VkA@mail.gmail.com>
Hi,
On 13/09/2014 at 10:26:18 +0100, Ezequiel Garcia wrote :
> > + nfc->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (!IS_ERR(nfc->clk)) {
> > + ret = clk_prepare_enable(nfc->clk);
> > + if (ret)
> > + return ret;
> > + } else {
> > + dev_warn(&pdev->dev, "NFC clock missing, update your Device Tree");
>
> Looks much better now thanks. If the clock is not really optional, you
> can consider this a firmware bug. We've used FW_BUG messages for these
> cases
> (see vim drivers/watchdog/orion_wdt.c), so you could write something like:
>
> dev_warn(..., FW_BUG "devicetree clock missing");
>
Yeah, I've considered using FW_WARN like Thomas suggested but I'm not
sure it really relates to device tree. Apart from x86, FW_WARN and
FW_BUG are only used on mvebu stuff ;)
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-09-13 10:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 23:23 [PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock Alexandre Belloni
2014-09-12 23:23 ` Alexandre Belloni
2014-09-12 23:23 ` Alexandre Belloni
2014-09-13 9:26 ` Ezequiel Garcia
2014-09-13 9:26 ` Ezequiel Garcia
2014-09-13 9:26 ` Ezequiel Garcia
2014-09-13 10:59 ` Alexandre Belloni [this message]
2014-09-13 10:59 ` Alexandre Belloni
2014-09-13 10:59 ` Alexandre Belloni
2014-09-18 5:49 ` Brian Norris
2014-09-18 5:49 ` Brian Norris
2014-09-18 5:49 ` Brian Norris
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=20140913105914.GD26281@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=josh.wu@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nicolas.ferre@atmel.com \
/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.