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

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

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

跳至解决方案
6,574 次查看
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 项奖励
回复
1 解答
5,235 次查看
aravinthkumarja
Senior Contributor II

Thanks for your guys. i have fixed this issue.

Regards,

Aravinth

在原帖中查看解决方案

0 项奖励
回复
7 回复数
5,235 次查看
karvekar
Contributor I

I have a similar question.

How to add iio:device to imx6 HAL ?

0 项奖励
回复
5,235 次查看
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 项奖励
回复
5,235 次查看
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 项奖励
回复
5,235 次查看
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 项奖励
回复
5,236 次查看
aravinthkumarja
Senior Contributor II

Thanks for your guys. i have fixed this issue.

Regards,

Aravinth

0 项奖励
回复
5,235 次查看
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 项奖励
回复
5,235 次查看
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 项奖励
回复