节点结束位置都需要加分号
of_iomap 完成映射
of_property_read_u32_array
of_property_read_string
of_fine_node_by_path
find ./arch/arm/boot/dts/ -type f -name “imx6ul” | grep “.dts$” | xargs grep -nr “&iomuxc”
淦,指导书少个i,日。
修改dtsi文件。
pinctrl_beep: beepgrp{
fsl,pins = <
MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01 0x10B0 IO 的上/下拉、驱动能力和速度
>;
};
misc设备没有在 /sys/class/ 中看到,不过不影响驱动加载, /dev/中有
INPUT子系统
数据结构:
struct input_dev{
unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
}
struct input_event {
#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(KERNEL)
struct timeval time;
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#else
__kernel_ulong_t __sec;
#if defined(sparc) && defined(arch64)
unsigned int __usec;
unsigned int __pad;
#else
__kernel_ulong_t __usec;
#endif
#define input_event_sec __sec
#define input_event_usec __usec
#endif
__u16 type;
__u16 code;
__s32 value;
};
time.tv_sec \time.tv_usec、type、 code、 value 位数
make 2>stderr.log 2>连在一起的,一个标识符
-f 判断是否为文件, -n判断是否为空字符
时间控制
input_dev.timer 结构就是 include/linux/timer.h 中的timer_list
struct timer_list {
/*
* All fields that change during normal runtime grouped to the
* same cacheline
*/
struct hlist_node entry;
unsigned long expires;
void (*function)(struct timer_list *);
u32 flags;
#ifdef CONFIG_LOCKDEP
struct lockdep_map lockdep_map;
#endif
};
高版本没有data问题需要解决 https://blog.youkuaiyun.com/shiniji_hh1126/article/details/6149367