Hacker News new | ask | show | jobs
by joezydeco 1776 days ago
Just a warning if you do embedded work with Linux (RPi, Beaglebone, etc)... this guide doesn't cover the Devicetree APIs. Doesn't even acknowledge their existence.
3 comments

> this guide doesn't cover the Devicetree APIs

Is there a guide for that?

Read the Documentation/devicetree directory in the kernel sources and look at how a few drivers implement their documented bindings.

This isn't a snarky RTFM comment. The usage model file in the kernel documentation gives good motivation for what device trees are used for and their basic structure, and the APIs to pull data from them are straightforward enough that you can probably figure them out by looking at an example.

The author is pretty open to any kind of criticisms and suggestions. It would be great if you open an issue to inform him the missing contents.
Already did
Thanks for submitting issue(s). The motivation of updating "The Linux Kernel Module Programming Guide" was for educational purpose. I agree with the idea to mention new kernel features such as Devicetree.
RPi is barely embedded work. It's almost always micro-desktop Linux.
True. But there are some of us working on ARM platforms that aren't RPi that need to hack drivers.

Anyone working with a SOM, for example, will want to customize the DT for their carrier board. And then your EE finds a cheaper controller chip somewhere. And then your display supplier switches captouch parts on you mid-production.

Sorry, was I venting there?

(And just a tip, don't break bad on the Pi here. For many people this is the only ARM platform worth working with. And definitely don't make fun of the lack of peripherals on the thing)

You're right. I was trying to write up a cpufreq driver for the Nintendo 3DS and found that LKMPG's complete lack of DT info astounding.
>True. But there are some of us working on ARM platforms that aren't RPi that need to hack drivers.

Which has nothing to do with RPi or embedded systems... Not sure if I understand.

>And just a tip, don't break bad on the Pi here. For many people this is the only ARM platform worth working with.

Ugh... Cell phones? Or any of the zillion of ARM development boards out there.