分类:driver

Ubuntu wireless-ac 9560 驱动异常

重启电脑后发现wifi不能使用了,网络设置里面提示未发现网络适配器。电脑比较新,之前安装ubuntu18.10 低版本kernel 版本就发现不识别wifi设备,更新到ubuntu19.10 后正常,不过正常安装后也反复重启过使用了一段时间。

  • Detected Intel(R) Wireless-AC 9560, REV=0x354;
  • Ubuntu 19.10 5.3.0-40-generic;
  • 小米笔记本pro 15;

第一时间排查dmesg 发现有iwlwifi 内核模块报错。主动搜索报错码-110毫无头绪,电脑比较新,系统也比较新。

顺着iwlwifi提示做了以下排除。

linux 看门狗

基于debian8 的linux设备会低概率的出现的系统完整死机,这里思考给linux添加完整的看门狗策略。

debian8已经采用systemd用以初始化系统和守护、管理系统进程。这里同时存在systemd 的watchdog和keepalive 单元文件,以及sysv init的watchdog keepavlie 初始化脚本,同时systemd也直接看门狗启动,那么该如何选择呢?

  • systemd直接支持看门狗启动;

  • debain8同时支持systemd和sysv init的看门狗以及保活机制。

  • Device Drivers-> Watchdog Timer Support

  • ./drivers/watchdog/Kconfig

    所以这里只需要使能CONFIG_WATCHDOG=y CONFIG_WATCHDOG_CORE=y

如上使能了过后还是没有出现看门狗设备,参考sunxi 主核发布说明确定4.17之后a64才加入看门狗功能,这里涉及sunxi_wdt和dts和驱动移植。

  • error

  • 启动日志

/bin/systemd-tty-ask-password-agent --watch

a64 io 中断初始化失败

如下pc0,gpio64 设置中断触发边沿失败。

对比,pb0 gpio32,这里没有edge 属性。

对比3.21.2.1. PB Configure Register 0 (Default Value: 0x77777777) 和3.21.2.10. PC Configure Register 0 (Default Value: 0x77777777) 这里pc0 确实不支持中断。

Overview of the V4L2 driver framework

This text documents the various structures provided by the V4L2 framework and their relationships.

The V4L2 drivers tend to be very complex due to the complexity of the hardware: most devices have multiple ICs, export multiple device nodes in /dev, and create also non-V4L2 devices such as DVB, ALSA, FB, I2C and input (IR) devices.

Especially the fact that V4L2 drivers have to setup supporting ICs to do audio/video muxing/encoding/decoding makes it more complex than most. Usually these ICs are connected to the main bridge driver through one or more I2C busses, but other busses can also be used. S...

linux gpio libc

对linux c app里面的一个gpio操作云里雾里半天,是时候好好理理了。

主要是这gpio number是如何同pin number 一一对应的。

奇怪,今天发现sys/class/gpio 下面的gpio没有了。只剩下gpiochip了。原来需要在应用export 对应io number。

这里的export和unport以及之后对 io number value的read write 操作都是在gpiolibc 上实现的。

接下来需要理一理gpiolibc 的实现,gpiolibc 所有操作都是基于gpio_desc *desc 变量。改变量通过gpio_desc 结构体定义这里的数组。数组索引就对应我们这里的io number。

这个结构体的实现主要是是通过gpio_chip来操作的,例如gpiod_set_value 是通过gpio_desc 获取到gpio_chip 然后在通过gpio_chip->set() 实现IO的读写。

所以对于gpio_chip 的初始化就很重要了。然而我并没有找。

对于如上计算的bank 1-7依次对应 PB-PH。...

arm级vp9 编解码cpu概况

这里系统了解全志和海思的解码能力。

从Allwinner_H6_V200_User_Manual_V1.1_decrypted->Chapter 2 Overview->2.2.6. Video Engine ->2.2.6.1. Video Decoder

从User Manual 来看,能够达到4k@30fps的帧率,但是实际测试在6fps。

暂时无其他资料,等待供应商提供。

hi3798 区分M和C系列,现在看来hi3798c v100 支持vp8,hi3798cv200 支持vp9。

Hi3798C V200.pdf-> Key Specifications

了解下vp9的...

linux cooling device

这里详细介绍并理解基于 allwinner a64 linux 下根据热量传感器 采集的温度用以自动调频 原理。

a64集两个热量传感器分别监控gpu和cpu温度。

挂载在sysfs数据属性

挂载sysfs 数据属性。

挂载在sysfs数据属性

/var/log/syslog 日志分析

如上日志表示基于cpu核心温度变化自动调节了cpu主频最大值。

如下代码片段设计:

  • 设计cpu压力测试(温度高会自自动调频);
  • 增加手动切换调频;
  • 实时打印温度、频率范围、当前频率值;
  • 可以尝试去掉cpu自动调频;