DeviceKit vs Switch events

Daniel Nascimento dnascimento.devel at gmail.com
Fri Jul 3 20:41:11 PDT 2009


Hi,

Some time ago there was a discussion in this list about how to handle
some switch events [1]. In that time was decided that SW_LID would be
supported by devicekit-power but I didn't see any definitions about
the others switches.

Merging what was discussed in that thread it seems that switches
defined in linux kernel (include/linux/input.h - 2.6.30) will be
supported this way:

---- DeviceKit-power
#define SW_LID 0x00 /* set = lid shut */

---- Pulseaudio
#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */
#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */

---- NetworkManager
#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
set = radio enabled */
#define SW_RADIO SW_RFKILL_ALL /* deprecated */

But I don't know were these 3 switches will be supported, I am
particularly interested by the tablet_mode and where I should go to
ask support for this switch (or if should I poll this directly?). Any
suggestions ?

#define SW_DOCK 0x05 /* set = plugged into dock */
#define SW_TABLET_MODE 0x01 /* set = tablet mode */
#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */

Thanks,
Daniel Oliveira Nascimento

[1] http://lists.freedesktop.org/archives/devkit-devel/2009-April/000146.html


More information about the devkit-devel mailing list