How to add ambient light sensor into Android(6.0) HAL layer

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

How to add ambient light sensor into Android(6.0) HAL layer

Jump to solution
4,404 Views
aravinthkumarja
Senior Contributor II

Hi All,
How to add new light sensor(ambient light sensor) into Android(6.0) HAL layer.?

without adding to HAL how to test it??


Regards
Aravinth

0 Kudos
1 Solution
3,065 Views
aravinthkumarja
Senior Contributor II

Thanks for your guys. i have fixed this issue.

Regards,

Aravinth

View solution in original post

0 Kudos
7 Replies
3,065 Views
karvekar
Contributor I

I have a similar question.

How to add iio:device to imx6 HAL ?

0 Kudos
3,065 Views
aravinthkumarja
Senior Contributor II

Hi Mak,

Added new sensor is big procedure. Can you please explore more about it. What kind of sensor you want to add, chip name, etc.?

Regards,

Aravinth

0 Kudos
3,065 Views
karvekar
Contributor I

I have imx6 Nitrogen6x_Max board.

Added ALS opt3001 on i2c2.

The driver in the kernel shows up as a iio device under 2-0044.

I can read the values from shell.

But the sensor HAL uses input devices instead.

Question was how to update Sensor HAL to accommodate an iio device ? 

0 Kudos
3,065 Views
jasminjose
Contributor I

Did you resolve the issue?

I have similar case:

I am trying to add opt3001(i2c0) HAL support to android oreo.

I am working on i.MX6 variscite som

I have added device driver for opt3001.

aravinthkumarjayaprakasam

0 Kudos
3,066 Views
aravinthkumarja
Senior Contributor II

Thanks for your guys. i have fixed this issue.

Regards,

Aravinth

0 Kudos
3,065 Views
igorpadykov
NXP Employee
NXP Employee

Hi Aravinth

one can refer to common android documentation

input - Android sensors hardware abstraction layer - Stack Overflow 

http://www.st.com/content/ccc/resource/technical/document/application_note/09/e5/63/88/10/ac/42/26/D... 

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

0 Kudos
3,065 Views
aravinthkumarja
Senior Contributor II

Thanks for response igor,

My light sensor device comes under iio:device, But right now in imx6 Android Hal layer they searching sensor device only inside /dev/input/

How can i make it for iio:device ??

Regards

Aravinth

0 Kudos