ideapad_laptop: add an event for mic mute hotkey
PATCH 1/1 ideapad_laptop: add an event for mic mute hotkey
Newer ideapad supports new mic new hotkey, and it is implemented via ACPI interface. This patch conver the mic mute event to a keycode KEY_MICMUTE
--- drivers/platform/x86/ideapad-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/platform/x86/ideapad-laptop.c +4 -0
@@ -567,6 +567,7 @@ static void ideapad_sysfs_exit(struct ideapad_private *priv)static const struct key_entry ideapad_keymap[] = { {KE_KEY ,6 , {KEY_SWITCHVIDEOMODE } }, {KE_KEY ,7 , {KEY_CAMERA } }, + {KE_KEY ,8 , {KEY_MICMUTE } }, {KE_KEY ,11 , {KEY_F16 } }, {KE_KEY ,13 , {KEY_WLAN } }, {KE_KEY ,16 , {KEY_PROG1 } },
@@ -809,6 +810,9 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)break ;case 13 :case 11 : +case 8 : +ideapad_input_report (priv, vpc_bit); +break ;case 7 :case 6 :ideapad_input_report (priv, vpc_bit);
Signature · 1 line
2.7.4
Quoted 22 lines · Alex Hung
Newer ideapad supports new mic new hotkey, and it is implemented via ACPI interface. This patch conver the mic mute event to a keycode
KEY_MICMUTESigned-off-by Alex Hung <[email protected]>--- drivers/platform/x86/ideapad-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/ideapad-laptop.c +1
-0@@ -567,6 +567,7 @@ static void ideapad_sysfs_exit(struct ideapad_private *priv)static const struct key_entry ideapad_keymap[] = { {KE_KEY ,6 , {KEY_SWITCHVIDEOMODE } }, {KE_KEY ,7 , {KEY_CAMERA } }, + {KE_KEY ,8 , {KEY_MICMUTE } }, {KE_KEY ,11 , {KEY_F16 } }, {KE_KEY ,13 , {KEY_WLAN } }, {KE_KEY ,16 , {KEY_PROG1 } },
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 813
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +1
-0@@ -809,6 +810,9 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)break ;case 13 :case 11 : +case 8 :
fall through is easier to read
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 815
Quoted 2 lines
drivers/platform/x86/ideapad-laptop.c +2
-0+ideapad_input_report (priv, vpc_bit); +break ;
so above two lines are not necessary.
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +0
-0case 7 :case 6 :ideapad_input_report (priv, vpc_bit);
Quoted 30 lines · Ike Panhc
Quoted 22 lines · Alex Hung
Newer ideapad supports new mic new hotkey, and it is implemented via ACPI interface. This patch conver the mic mute event to a keycode
KEY_MICMUTESigned-off-by Alex Hung <[email protected]>--- drivers/platform/x86/ideapad-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/ideapad-laptop.c +1
-0@@ -567,6 +567,7 @@ static void ideapad_sysfs_exit(struct ideapad_private *priv)static const struct key_entry ideapad_keymap[] = { {KE_KEY ,6 , {KEY_SWITCHVIDEOMODE } }, {KE_KEY ,7 , {KEY_CAMERA } }, + {KE_KEY ,8 , {KEY_MICMUTE } }, {KE_KEY ,11 , {KEY_F16 } }, {KE_KEY ,13 , {KEY_WLAN } }, {KE_KEY ,16 , {KEY_PROG1 } },drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 813
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +1
-0@@ -809,6 +810,9 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)break ;case 13 :case 11 : +case 8 :fall through is easier to read
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 815
Quoted 2 lines
drivers/platform/x86/ideapad-laptop.c +2
-0+ideapad_input_report (priv, vpc_bit); +break ;so above two lines are not necessary.
Are you happy with the changes otherwise Ike?
Quoted 5 lines
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 818
Quoted 5 lines
drivers/platform/x86/ideapad-laptop.c +0
-0case 7 :case 6 :ideapad_input_report (priv, vpc_bit);
Thanks,
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
Quoted 39 lines · Darren Hart
Quoted 30 lines · Ike Panhc
Quoted 22 lines · Alex Hung
Newer ideapad supports new mic new hotkey, and it is implemented via ACPI interface. This patch conver the mic mute event to a keycode
KEY_MICMUTESigned-off-by Alex Hung <[email protected]>--- drivers/platform/x86/ideapad-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/ideapad-laptop.c +1
-0@@ -567,6 +567,7 @@ static void ideapad_sysfs_exit(struct ideapad_private *priv)static const struct key_entry ideapad_keymap[] = { {KE_KEY ,6 , {KEY_SWITCHVIDEOMODE } }, {KE_KEY ,7 , {KEY_CAMERA } }, + {KE_KEY ,8 , {KEY_MICMUTE } }, {KE_KEY ,11 , {KEY_F16 } }, {KE_KEY ,13 , {KEY_WLAN } }, {KE_KEY ,16 , {KEY_PROG1 } },drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 813
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +1
-0@@ -809,6 +810,9 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)break ;case 13 :case 11 : +case 8 :fall through is easier to read
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 815
Quoted 2 lines
drivers/platform/x86/ideapad-laptop.c +2
-0+ideapad_input_report (priv, vpc_bit); +break ;so above two lines are not necessary.
Are you happy with the changes otherwise Ike?
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 818
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +0
-0case 7 :case 6 :ideapad_input_report (priv, vpc_bit);Thanks,
Yes. Looks good to me.
Quoted 45 lines · Ike Panhc
Quoted 44 lines · Darren Hart
Quoted 30 lines · Ike Panhc
Quoted 22 lines · Alex Hung
Newer ideapad supports new mic new hotkey, and it is implemented via ACPI interface. This patch conver the mic mute event to a keycode
KEY_MICMUTESigned-off-by Alex Hung <[email protected]>--- drivers/platform/x86/ideapad-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/ideapad-laptop.c +1
-0@@ -567,6 +567,7 @@ static void ideapad_sysfs_exit(struct ideapad_private *priv)static const struct key_entry ideapad_keymap[] = { {KE_KEY ,6 , {KEY_SWITCHVIDEOMODE } }, {KE_KEY ,7 , {KEY_CAMERA } }, + {KE_KEY ,8 , {KEY_MICMUTE } }, {KE_KEY ,11 , {KEY_F16 } }, {KE_KEY ,13 , {KEY_WLAN } }, {KE_KEY ,16 , {KEY_PROG1 } },drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 813
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c +1
-0@@ -809,6 +810,9 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)break ;case 13 :case 11 : +case 8 :fall through is easier to read
Quoted 4 lines
drivers/platform/x86/ideapad-laptop.c static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) · line 815
Quoted 2 lines
drivers/platform/x86/ideapad-laptop.c +2
-0+ideapad_input_report (priv, vpc_bit); +break ;so above two lines are not necessary.
Are you happy with the changes otherwise Ike?
Quoted 5 lines
Quoted 5 lines
drivers/platform/x86/ideapad-laptop.c +0
-0case 7 :case 6 :ideapad_input_report (priv, vpc_bit);
Quoted 5 lines
Quoted 2 lines
Thanks,
Yes. Looks good to me.
Thanks Ike, in the future, please provide an explicit Acked, Reviewed, or Tested-by so I can accurately record your level of review. I've added your Acked-by here.
Signature · 2 lines
Darren Hart Intel Open Source Technology Center