All of lore.kernel.org
 help / color / mirror / Atom feed
* Voltage/current/sensor monitoring interface and Wiegand
@ 2010-09-09  0:02 ` Stuart Longland
  0 siblings, 0 replies; 17+ messages in thread
From: Stuart Longland @ 2010-09-09  0:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

I'm currently writing a driver for an in-house developed sensor
controller device.  This device communicates via I?C, and functions as a
multi-function device incorporating:

- Touchscreen controller
- Keypad/Button controller
- LED driver
- Voltage/current monitor
- Temperature sensor monitor
- Light sensor monitor
- PIR (motion) detection monitor
- Communications interface (for slow serial links like Wiegand)

Our target is a Ka-Ro TX27 module, running their supplied kernel
(2.6.28)... however I'm not afraid to backport things from the latest
kernel, or to forward port any changes for mainline kernel inclusion.
(I've already got an experimental patchset that gets these things
booting kernel 2.6.34.)

The first three on this list, I've got settled pretty nicely using
existing interfaces.  The things I'm not sure about, are the remaining
interfaces, and how to best write a driver for them.

How are voltage *monitors* normally written?  (note, not voltage
*regulators*... this thing does not alter the voltage rails.)  I tried
to make sense of lm-sensors, but that seems very ad-hoc (maybe I missed
some document that explains it) to me.  It's hard to be clear on what is
the *right* way to report a voltage or current reading to userspace.

For the temperature and light sensing... temperature sensors certainly
exist in the PC world, and maybe I should look closely at how they are
normally done, but I wasn't sure about the light sensor.  I was thinking
maybe an input device with some new absolute value reported?

Likewise with the PIR sensor, I notice there's a "gesture" input
(MSC_GESTURE)... seems appropriate?  Or am I barking up the wrong tree?

The other feature is for things like Wiegand... Looking around I cannot
see any interface in the Linux kernel for Wiegand interfaces.

<http://en.wikipedia.org/wiki/Wiegand_protocol>

Given the likely use of embedded Linux in security systems, it makes
sense to come up with a suitable interface out in the open, rather than
everyone coming up with their own device-specific interfaces.

Apologies if this has been asked before, but I've looked around and
haven't seen anything... so I figured before I get too deep into this,
I'd enquire about the Right Way it should be done. ;-)

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)      .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'
http://dev.gentoo.org/~redhatter             :.'

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-09-13  1:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09  0:02 Voltage/current/sensor monitoring interface and Wiegand Stuart Longland
2010-09-09  0:02 ` Stuart Longland
2010-09-09  2:48 ` Ryan Mallon
2010-09-09  2:48   ` Ryan Mallon
2010-09-09  5:01   ` Stuart Longland
2010-09-09  5:01     ` Stuart Longland
2010-09-09  8:29     ` Mark Brown
2010-09-09  8:29       ` Mark Brown
2010-09-10 20:47     ` Guenter Roeck
2010-09-09 12:43 ` Jonathan Cameron
2010-09-09 12:43   ` Jonathan Cameron
2010-09-09 22:46   ` Stuart Longland
2010-09-09 22:46     ` Stuart Longland
2010-09-10  6:32   ` Dmitry Torokhov
2010-09-10  6:32     ` Dmitry Torokhov
2010-09-13  1:13     ` Stuart Longland
2010-09-13  1:13       ` Stuart Longland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.