How to decide the sensor event in driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to decide the sensor event in driver

490 次查看
wangvictor
Contributor III

Hi All,

I'm porting Android 6.0 on i.MX6 Dual light.

I've been facing this problem for a long time.

My light sensor will not mount on the same event where located between /sys/class/input/event6 and /sys/class/input/event7.

How can I set the static path which is on /sys/class/input/event7 for my light sensor?

Thanks in Advanced!

标签 (5)
0 项奖励
2 回复数

389 次查看
b36401
NXP Employee
NXP Employee

There is no easy way to make it static.
However you can create a script that finds actual entry for the sensor and makes a symlink to /sys/class/input/eventX.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励

389 次查看
wangvictor
Contributor III

Thanks for your reply.

Actually I already can do it with script.

However, It is easy to do it on Ubuntu or qt-wayland but not in Android.

On Android I need to send the property so I have to get a static event.

Previously I used script on Android too but in my script I have to use `sed` to capture the words.

According that I have to give it root permission but I can't (Because I won't give my customer the root permission).

That's why I have to find the way to modify the driver and make my event static.

Or do you have other suggestion for me?

Thanks in Advanced!

0 项奖励