读取PMIC(pm8916)寄存器的值
oot@M939-F400:/sys/kernel/debug/spmi/spmi-0 # echo 150 > count
root@M939-F400:/sys/kernel/debug/spmi/spmi-0 # echo 0x800 > address
root@M939-F400:/sys/kernel/debug/spmi/spmi-0 # cat data > /data/pon.txt
root@M939-F400:/sys/kernel/debug/spmi/spmi-0 # cat data
00800 00 03 03 00 01 01 00 98 80 00 00 00 00 00 00 00
00810 00 03 03 03 00 03 03 00 00 00 00 00 00 00 00 00
00820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00830 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00840 0F 07 04 80 0F 07 04 80 0F 07 04 80 0F 07 04 00
00850 0F 07 04 00 0F 03 08 00 00 00 01 80 00 00 00 00
00860 00 00 00 80 00 00 04 80 00 00 04 00 00 00 00 00
00870 0F 00 00 00 02 04 00 00 00 00 00 00 00 00 00 00
00880 FE 00 40 00 00 00 00 00 05 00 20 00 01 00 00 00
00890 00 40 00 00 00 00
//Spmi.c (driversspmi)
spmi_dfs_add_controller
debugfs_create_u32("count", DFS_MODE, dir, &ctrl_data->cnt);
debugfs_create_x32("address", DFS_MODE, dir, &ctrl_data->addr);
debugfs_create_file("data", DFS_MODE, dir, ctrl_data,&spmi_dfs_reg_fops);
list_add(&ctrl_data->node, &dbgfs_data.ctrl);
spmi_driver_register
drv->driver.bus = &spmi_bus_type; {spmi_device_match匹配}