大樹底下好乘涼 ︰ 《拜樹頭》 ? ※ Q&A !

Baitou_Mountain_Tianchi

長白山‧天池

飲水思源

北周‧庾信徵調曲 六

正陽和氣萬類繁,君王道合天地尊。
黎人耕植於義圃,君子翱翔於禮園。
落其實者思其樹,飲其流者懷其源。
咎繇為謀不仁遠,士會為政群盜棄。
克寬則昆蟲內向,彰信則殊俗宅心。
浮橋有月支抱馬,上苑有烏孫學琴。
赤玉則南海輸贐,白環則西山獻琛。
無勞鑿空於大夏,不待蹶角於蹛林。

在大變動時候,通常『問題』和『答案』至少一樣重要,甚至於更重要。許多『零碎資訊』拼湊出『藍圖』,或許正是『逆流朔源』的大好時機!因此也許該閱讀論壇的這個『文本』︰

I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

by PhilE » Wed Jan 21, 2015 4:45 pm
The most recent Raspbian release, with Pi 2 support, switches to a new kernel (3.18), and includes a configuration change to enable Device Tree support by default. This has caused some previously working things to mysteriously stop working, but with a few configuration changes normal service should be resumed. I’ll tell you how to do that in a moment, but first a short history lesson. Skip forward to “TL;DR: Yeah, yeah, but how do I fix it?” if you don’t care.
……
So DT is officially a “Thing”, but why should Raspberry Pi use it? The change is primarily a practical one. Until now, supporting some peripheral cards has required the addition of “struct platform_device” objects to the board support code. These are usually conditionally compiled based on the kernel configuration options, but in order to prevent regular users from having to compile their own kernel these options are turned on in the standard builds. As a result, at boot time many (typically unwanted) modules are loaded unless they added to the blacklist (which prevents the automatic loading but still allows subsequent manual loading). Insufficient blacklisting could lead to nasty contention for GPIO pins, usually experienced after a kernel update since the blacklist file (/etc/modprobe.d/raspi-blacklist.conf) isn’t a part of the kernel and hence doesn’t automatically get updated.

Device Tree turns this system on its head, by replacing those “struct platform_device”s with nodes in the DT, allowing users to control which devices are enabled and hence which modules get loaded. Adding a new device driver module to the kernel doesn’t automatically result in a module being loaded – the appropriate nodes must also be added to the DT.

TL;DR: Yeah, yeah, but how do I fix it?……

要是帶著『思源之心』慎思 Q&A ……

I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

by PhilE » Mon Feb 09, 2015 1:27 pm

We need a bit more information:
1) Which version are you running now? What does `uname -a` say?

2) Does /proc/device-tree exist?

3) Have you read the above and enabled the SPI interface? I would guess so, if it gets that far before failing, but I’d like confirmation.

4) Does disabling device tree (add “device_tree=” to your config.txt and reboot) make a difference?

5) What is connected to your SPI interface?

 

是否能窺探『先機』於萬一??