Messages in this thread Patch in this message | | | Date | Wed, 3 Mar 2010 14:07:19 +0100 | Subject | Re: [GIT PULL] Ambient Light Sensors subsystem | From | Linus Walleij <> |
| |
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
| |