高通平台功耗 - How_to_determine_wakeup_trigger_from_suspend_caused_by_PMIC_IRQ

Linux内核日志调试信息及命令

[ 366.151054] gic_show_resume_irq: 222 triggered

This debug message in the kernel log indicates that a PMIC SPMI IRQ was the wakeup trigger from suspend.

To enable additional debug message printing use the following cmds.

adb root
adb wait-for-devices
adb shell mount -t debugfs none /sys/kernel/debug
adb shell “echo 8 > /proc/sys/kernel/printk”
adb shell “echo ‘func qpnpint_handle_irq +p’ > /sys/kernel/debug/dynamic_debug/control”
Once the device wakes up from suspend, messages like the ones below will get printed out.

Example #1:

[ 26.935784] qpnpint_handle_irq: spec slave = 0 per = 18 irq = 0
slave = 0 indicates that it is PM8941. per = 18 indicates that it is PM8941 peripheral 0x12. If we look this up in the PM8941 register document it corresponds to SMBB_BAT_IF_PERPH. Looking at register 0x1218 indicates that irq = 0 corresponds to the BAT_PRES IRQ.

Example #2:

[ 23.708495] qpnpint_handle_irq: spec slave = 0 per = 19 irq = 1
slave = 0 indicates that it is PM8941. per = 19 indicates that it is PM8941 peripheral 0x13. If we look this up in the PM8941 register document it corresponds to SMBB_USB_CHGPTH_PERPH Looking at register 0x1318 indicates that irq = 1 corresponds to the USBIN_VALID IRQ.

在使用 CMake 配置项目时,如果遇到 `unable to determine default LIBDIR` 的错误提示,通常与系统环境变量配置、CMake 的查找路径设置或依赖库的安装状态有关。此类问题常见于类 Unix 系统(如 Linux 或 macOS),尤其是在项目依赖某些库(例如 OpenSSL、zlib 等)时,CMake 无法自动定位这些库的安装路径。 ### 问题分析 CMake 在配置阶段会尝试查找系统中已安装的库,并确定其路径,尤其是 `LIBDIR`(库文件存放目录,如 `/usr/lib` 或 `/usr/local/lib`)。如果 CMake 无法确定默认的 `LIBDIR`,可能的原因包括: - 系统中未正确安装相关依赖库; - 环境变量(如 `PKG_CONFIG_PATH`)未设置,导致 pkg-config 无法找到 `.pc` 文件; - CMake 的查找路径未明确指定,导致无法定位到库文件; - 使用了非标准安装路径,而未通过 `-DCMAKE_PREFIX_PATH` 或 `-DCMAKE_INSTALL_PREFIX` 明确告知 CMake。 ### 解决方案 #### 明确指定 CMake 的前缀路径 如果库文件安装在非标准路径下,可以通过以下方式告知 CMake 查找路径: ```bash cmake -DCMAKE_PREFIX_PATH=/opt/local .. ``` 其中 `/opt/local` 是库文件的安装前缀路径。 #### 设置安装路径 若在执行 `make install` 时出现 LIBDIR 问题,可通过以下方式指定安装路径: ```bash cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. ``` 此设置会将默认的 `LIBDIR` 指定为 `/usr/local/lib`。 #### 使用 `pkg-config` 辅助查找 确保系统中已安装 `pkg-config`,并且相关库的 `.pc` 文件位于 `PKG_CONFIG_PATH` 中。例如: ```bash export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH ``` 这样可帮助 CMake 更好地识别库的安装位置。 #### 安装缺失的依赖库 在 macOS 上,推荐使用 Homebrew 安装相关库[^1]。例如: ```bash brew install openssl zlib ``` 安装完成后,CMake 通常能够正确识别这些库的路径。 #### 修改 CMakeLists.txt 在 `CMakeLists.txt` 中显式设置 `LIBDIR`,例如: ```cmake set(LIBDIR "/usr/local/lib" CACHE PATH "Library directory") ``` 这将强制 CMake 使用指定的库路径,避免自动探测失败的问题。 ### 示例配置流程 假设项目依赖 OpenSSL,并且 OpenSSL 安装在 `/usr/local/opt/openssl`,可以执行以下命令配置项目: ```bash export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/openssl -DCMAKE_INSTALL_PREFIX=/usr/local .. ``` ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

bsp linux开发

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值