DSP

高通平台手机开发之Sensor

2019-07-13 16:50发布

点击打开链接4.6. Sensor 
高通文档 
1) 80-N7635-1_E_Snapdragon_Sensors_Core_New_Sensor_Driver_Integration_LA.pdf2) 80-NA157-92_C_MSM8974_Snapdragon_Sensors_Core_Deep_Dive.pdf3) 传感器工作原理.ppt8974支持ADSP处理sensor信号,也可以由AP处理sensor信号。ADSP侧的驱动是有高通和Sensor厂商协同开发的。AP侧的驱动由Sensor厂商自己开发。调试 
adsp_proc/Sensors/smgr/src/common/sns_smgr_init.c 
smgr_sensor_fn_ptr_map[]里看看有没有对应的sensor,没有要加上。 
AP这边需要配置,可以配置I2C地址,GPIO等 
vendor/qcom/proprietary/sensors/dsps/reg_defaults/sensor_def_qcomdev.conf 
## SSI SMGR Cfg 0 MPU6515,accel 
1903 0xe437aac1fb6c9c84 0x00010001 #UUID 
1902 0xe9430350c53787a3 0x00010001 #UUID1904 0xffff 0x00010001 #off_to_idle 
1905 250000 0x00010001 #idle_to_ready 
1906 12 0x00010001 #i2c_bus 
1907 1000 0x00010001 #reg_group_id 
1908 0 0x00010001 #cal_grp_id 
1909 100000 0x00010001 #gpio1 
1910 250000 0x00010001 #gpio2 
1911 0 0x00010001 #sensor_id 
1912 0x69 0x00010001 #i2c_address,AD0 is low,0x68;AD0 is high,0x69 
1913 1 0x00010001 #data_type1 
1914 0 0x00010001 #data_type2 
1915 -1 0x00010001 #rel_sns_idx 
1916 1 0x00010001 #sens_default 
1917 0x40 0x00010001 #flags,0x40 is poll mode 
1982 0 0x00010001 #device_select