How to decide the sensor event in driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to decide the sensor event in driver

518 Views
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!

Labels (5)
0 Kudos
2 Replies

417 Views
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 Kudos

417 Views
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 Kudos