Re: [PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock
From: Alexandre Belloni
Date: Sat Sep 13 2014 - 06:59:33 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/