lkml.org 
[lkml]   [2010]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [GIT PULL] Ambient Light Sensors subsystem
From
2010/3/3 Dima Zavin <dmitriyz@google.com>:

> there are plenty of
> drivers floating out there from many OEMs/vendors

Bad for them that they didn't work on integrating these to the
mainline kernel and creating proper subsystems for them
earlier.

> that are not ALSs,
> but essentially need a similar interface (e.g. proximity sensor).

I have a proximity sensor driver pending here on top of GPIO,
creating an input-on-top-of-GPIO driver framework. Too much
to do but here is the userspace interface:

diff --git a/include/linux/input.h b/include/linux/input.h
index a5802c9..cbe8a98 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -644,6 +644,7 @@ struct input_absinfo {
#define SW_RADIO SW_RFKILL_ALL /* deprecated */
#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */
#define SW_DOCK 0x05 /* set = plugged into dock */
+#define SW_PROXIMITY 0x06 /* set = prox. sensor detects object */
#define SW_MAX 0x0f
#define SW_CNT (SW_MAX+1)

--
Comes in through /dev/input/event* something, simple.

I have heard about proximity sensors returning more than a binary
value, do you have one of those?

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2010-03-03 14:09    [W:0.070 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site