From: Banajit Goswami bgoswami@codeaurora.org
Some devices may not support specific type of input devices. For example, when a headset or extension cable with GND/MIC swap is plugged into a headset jack that does not support the headset/cable, it needs to be reported with a corresponding input event. Also, increase the max values for INPUT_DEVICE_ID_SW_MAX and SW_MAX, to accommodate future extension of the number of event.
Signed-off-by: Gopikrishnaiah Anandan agopik@codeaurora.org Signed-off-by: Banajit Goswami bgoswami@codeaurora.org --- include/linux/mod_devicetable.h | 2 +- include/uapi/linux/input-event-codes.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 448621c..7586099 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -299,7 +299,7 @@ struct pcmcia_device_id { #define INPUT_DEVICE_ID_LED_MAX 0x0f #define INPUT_DEVICE_ID_SND_MAX 0x07 #define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x0f +#define INPUT_DEVICE_ID_SW_MAX 0x1f #define INPUT_DEVICE_ID_PROP_MAX 0x1f
#define INPUT_DEVICE_ID_MATCH_BUS 1 diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 85387c7..960fa86 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -808,7 +808,8 @@ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ -#define SW_MAX 0x0f +#define SW_UNSUPPORT_INSERT 0x10 /* set = unsupported device inserted */ +#define SW_MAX 0x1f #define SW_CNT (SW_MAX+1)
/*