On Mon, Nov 25, 2013 at 6:59 PM, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote: > Hi Ping, > > On Fri, Nov 15, 2013 at 12:00:02PM -0800, Ping Cheng wrote: >>> @@ -856,6 +856,7 @@ struct input_keymap_entry { >> #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ >> #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ >> #define SW_LINEIN_INSERT 0x0d /* set = inserted */ >> +#define SW_TOUCH 0x0e /* set = touch switch turned on (touch events off) */ > > I do not think we should be adding this as is as it seems to be very > wacom-specific. I'd rather call it something else, like SW_MUTE_DEVICE > or similar. Thank you Dmitry for reviewing the patch. I can change the event to SW_MUTE_DEVICE. > I also wonder if this should really be a switch: can you query it's > state? Yes, it is a hardware switch. The state is posted periodically from the device. > What happen if user plugs in the device, engages the switch and > then [re]loads the driver? The state will be updated in the driver, with this patch. > Will the state be still signalled properly? Sure. > What about suspend/resume or hibernation? Since the state is updated regularly, it won't be lost when system wakes up. Basically, we are dealing with a hardware switch, which is controlled by end users. Firmware and driver can not do much about it except reporting its state. Does this answer your questions? Ping -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html