随笔分类 -  driver

摘要:如果要在 rc.local 呼叫 python script python script 的位置需使用絕對路徑 其 python script 裡的有關 file 的位置也需使用 絕對路徑 如果要在 rc.local 呼叫建立 file file 的位置需使用絕對路徑 rc.local 位在 /et 阅读全文
posted @ 2019-07-17 17:17 wangchangruei 阅读(593) 评论(0) 推荐(0) 编辑
摘要:insmod module 會在 /proc/devices/ 下產生 major number 及 device name mknod 會使用 /proc/devices/ 下的 major number 在 /dev 建立 節點 reference: https://www.cnblogs.co 阅读全文
posted @ 2019-07-16 17:13 wangchangruei 阅读(374) 评论(0) 推荐(0) 编辑
摘要:Question : When you see the log "Flags mismatch irq ............", maybe you use the same irq number to register different interrupt handler . irq num 阅读全文
posted @ 2018-05-17 22:06 wangchangruei 阅读(3722) 评论(0) 推荐(0) 编辑
摘要:device tree source 的 interrupt names property 會對應到 pltform_get_irq_byname() 的第二個參數。 .dtsi or .dts .c 阅读全文
posted @ 2018-04-22 20:08 wangchangruei 阅读(1004) 评论(0) 推荐(0) 编辑
摘要:最近遇到一個問題, gpio 讀出來的值與預期不同, 詳細描述如下: 首先手機 download 了一個完整的 daily build image , 接下來 不斷地修改 kernel 部分 code, 並且不斷地燒錄 其中一部分 image,也就是 bootimage, 一個完整的 image 是 阅读全文
posted @ 2018-04-13 15:56 wangchangruei 阅读(207) 评论(0) 推荐(0) 编辑
摘要:27 即是所要設定的溫度, 此設定需要進入 adb shell, 方可設定 電池溫度, 並且需等一會兒才會生效, 可以使用以下命令驗證是否生效。 阅读全文
posted @ 2018-01-02 19:55 wangchangruei 阅读(472) 评论(0) 推荐(0) 编辑
摘要:Schematic 解說 上面的 線路圖, R1 R2 只能有一個被接上, R3 R4 只能有一個被接上, 是使用 gpio 讀取 電壓 判斷為0 或是 1 這時的 gpio 設定,其中一個參數需設為 NO PULL, 不可以有 pull down, 不可以有 pull up, 否則會影響電壓讀取, 阅读全文
posted @ 2017-09-26 15:15 wangchangruei 阅读(700) 评论(0) 推荐(0) 编辑
摘要:Platform MSM8917 MSM8937 defconfig file position Android/kernel/msm 3.18/arch/arm/configs/ 阅读全文
posted @ 2017-09-15 10:02 wangchangruei 阅读(342) 评论(0) 推荐(0) 编辑
摘要:Platform Qualcomm MSM8917 or MSM8937 Source kernel/msm 3.18/drivers/power/qpnp smbcharger.c kernel/msm 3.18/arch/arm64/boot/dts/qcom/msm pmi8937.dtsi 阅读全文
posted @ 2017-09-14 14:07 wangchangruei 阅读(292) 评论(0) 推荐(0) 编辑
摘要:Platform : Qualcomm MSM8937 PMIC : Qualcomm PMI8940 OTG base on USB2.0,增加 1. device 可當 host 也可當 peripheral。 2. 增加 HNP 用來交換 host peripheral 的 protocol. 阅读全文
posted @ 2017-08-09 19:34 wangchangruei 阅读(1452) 评论(0) 推荐(0) 编辑
摘要:Bit banging Bit banging is a technique for serial communications using software instead of dedicated hardware. Software directly sets and samples the 阅读全文
posted @ 2017-07-21 09:35 wangchangruei 阅读(439) 评论(0) 推荐(0) 编辑
摘要:目標 因為對 device tree 不是很熟悉, 所以就將 device tree, 設為學習目標。 啟動 注意, 這篇隨筆的解說都放在最下面,會標 Explanation_XX,只要搜尋 Explanation_XX 往上找,就可以看到 source code 要解說的點, 總之就是多找幾遍,如 阅读全文
posted @ 2017-07-13 19:46 wangchangruei 阅读(7925) 评论(0) 推荐(0) 编辑
摘要:https://tw.transcend info.com/Support/FAQ 940 以下的內容皆來自上面這個網址。 什麼是USB 3.1? 什麼是USB 3.1? USB 3.1為USB協會制定的新規範,分別為USB 3.1 Gen1和Gen2 USB 3.1 Gen1 (SuperSpee 阅读全文
posted @ 2017-06-27 10:28 wangchangruei 阅读(746) 评论(0) 推荐(0) 编辑
摘要:為 device node 取 label name, 可以在其它位置使用 &label 存取 device node。 Ex ./arch/arm/boot/dts/stm32f429.dtsi ./arch/arm/boot/dts/stm32f429 disco.dts 阅读全文
posted @ 2017-06-24 22:37 wangchangruei 阅读(843) 评论(0) 推荐(0) 编辑
摘要:打印 PMIC register value 方式有二種, 一種是使用 adb shell cat pmic register 一種是直接在 code 裡 call dump pmic register function, 一直在 log 中印出 pmic register. 阅读全文
posted @ 2017-06-21 19:39 wangchangruei 阅读(944) 评论(0) 推荐(0) 编辑
摘要:device tree source Example1 Example2 Example3 阅读全文
posted @ 2017-06-21 15:56 wangchangruei 阅读(614) 评论(0) 推荐(0) 编辑
摘要:昨天有同事問說, 他要測試 battery capacity curve, 並且負載要使用 33mA, 於是我想到有一個 apk 名稱為 快速放電 (最下方),可以控制 cpu 的 load, 他試了後,調出來的負載都大於 33mA, 在今早突然閃過一念頭, mobile flight mode s 阅读全文
posted @ 2017-06-20 10:56 wangchangruei 阅读(396) 评论(0) 推荐(0) 编辑
摘要:device tree source Example1 Example2 Example3 Example4 阅读全文
posted @ 2017-06-19 22:13 wangchangruei 阅读(2588) 评论(0) 推荐(1) 编辑
摘要:Environment MTK platform 測試電池容量 測試電池是從滿電,一般是 4.35V 開始放電, 放到 3.4V 結束, 累計放電量, 最下方是電池示意圖, 左邊是輕載,右邊是重載, 輕載時流過的電流較小,battery 內阻上的壓降較少,所以真正的 battery voltage 阅读全文
posted @ 2017-06-19 14:08 wangchangruei 阅读(400) 评论(0) 推荐(0) 编辑
摘要:Creating .config file 以上命令是 將變數 ARCH=arm,CROSS_COMPILE=arm none eabi 傳進 Makefile 裡使用, 在 ./arch/arm/configs下有一隻給 stm32 board 使用的設定檔 stm32_defconfig 使用 阅读全文
posted @ 2017-06-18 18:36 wangchangruei 阅读(289) 评论(0) 推荐(0) 编辑