![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LINUX
起舞的迈特凯
这个作者很懒,什么都没留下…
展开
-
repo的一些常用命令
repo清除所有修改及更新命令repo forall -c “pwd;git clean -f;git checkout -f”;repo sync -c --no-tags;repo sync -l;原创 2020-09-18 20:11:46 · 784 阅读 · 0 评论 -
DEVICE_ATTR demo简单使用(实用)
1. DEVICE_ATTR 创建设备节点,可以write/read信息,操作gpio等,很实用.2. DEVICE_ATTR函数原型(include/linux/device.h)#define DEVICE_ATTR(_name, _mode, _show, _store) \ struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) /* interface for exp原创 2020-08-28 17:02:46 · 1089 阅读 · 1 评论 -
android property_get/property_set设置与avc权限添加
1.使用需要添加对应的头文件,同时需要在Android.mk文件中加入库libcutils.#include <cutils/properties.h>2.property_get/property_set 函数原型/* property_get: returns the length of the value which will never be** greater than PROPERTY_VALUE_MAX - 1 and will always be zero t原创 2020-07-29 17:11:09 · 2960 阅读 · 0 评论 -
shell延时循环执行
#!/bin/bashi=0;while [ true ]; do let i++; /bin/sleep 2 echo "start $i " adb root adb remount echo "--------------------------" done原创 2019-12-26 10:41:53 · 1868 阅读 · 0 评论 -
mtk_spi 总线架构
mt6739-kernel4.40. file_list2. alps/kernel-4.4/include/linux/spi/spi.h struct spi_device, struct spi_driver, struct spi_board_info, struct spi_transfer, struct spi_master, struct s...转载 2019-07-15 18:31:47 · 2256 阅读 · 0 评论 -
cherry-pick 提交报错
git cherry-pick +commitIt took 2.01 seconds to enumerate untracked files. 'status -uno'may speed it up, but you have to be careful not to forget to addnew files yourself (see 'git help status')....原创 2019-05-22 09:53:14 · 14318 阅读 · 0 评论 -
enable_irq&enable_irq_wake linux中断
enable_irq使能IRQ中断处理 系统睡眠时不能使能 enable handling of an irqenable_irq_wake中断唤醒功能,多用于指纹、光感传感器唤醒系统用 control irq power management wakeup,Wakeup mode lets this IRQ wake the system from sleep/** * ...原创 2019-05-06 13:40:07 · 1377 阅读 · 0 评论 -
module_init subsys_initcall与late_initcall的区别
kernel-4.4\include\linux\init.h#define pure_initcall(fn) __define_initcall(fn, 0)#define core_initcall(fn) __define_initcall(fn, 1)#define core_initcall_sync(fn) __define_initcall(fn, 1s)#defi...原创 2019-02-15 11:25:51 · 1621 阅读 · 0 评论 -
LINUX驱动注册过程失败处理不当引起的恶果
LINUX设备驱动有标准的结构,注册的时候对比device和driver的名字,如果相等就调用probe函数将资源注册进去,但是如果注册失败,在probe中途退出的时候要注意,如果直接退出,但是原来注册了部分资源,如果不设置错误原因的参数返回,默认是成功返回,这样错误的驱动就会被其他资源使用,但是由于没有完成注册好,缺少资源。或者由于注册失败在中途退出虽然将原来的资源释放掉了,但是probe没有设转载 2017-05-22 20:12:46 · 1018 阅读 · 0 评论