[PATCHv5] mtd: nand: atmel_nand: retrieve NFC clock

From
Alexandre Belloni <hidden>
Date
2014-09-13 10:59:20
Also in
lkml
Reply to
Ezequiel Garcia, 2014-09-13
Hi,

On 13/09/2014 at 10:26:18 +0100, Ezequiel Garcia wrote :
quoted
+       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
Thread (4 messages) 4 messages, 3 authors, last reply 2014-09-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help