* [PATCH] ideapad_laptop: add an event for mic mute hotkey
@ 2016-05-30 7:26 Alex Hung
2016-06-03 8:33 ` Ike Panhc
0 siblings, 1 reply; 5+ messages in thread
From: Alex Hung @ 2016-05-30 7:26 UTC (permalink / raw)
To: ike.pan, dvhart, platform-driver-x86, 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_MICMUTE
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 4a23fbc..aa87a42 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -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);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ideapad_laptop: add an event for mic mute hotkey
2016-05-30 7:26 [PATCH] ideapad_laptop: add an event for mic mute hotkey Alex Hung
@ 2016-06-03 8:33 ` Ike Panhc
2016-06-07 21:54 ` Darren Hart
0 siblings, 1 reply; 5+ messages in thread
From: Ike Panhc @ 2016-06-03 8:33 UTC (permalink / raw)
To: Alex Hung, dvhart, platform-driver-x86
On 05/30/2016 03:26 PM, Alex Hung wrote:
> 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
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
> drivers/platform/x86/ideapad-laptop.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index 4a23fbc..aa87a42 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -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:
fall through is easier to read
> + ideapad_input_report(priv, vpc_bit);
> + break;
so above two lines are not necessary.
> case 7:
> case 6:
> ideapad_input_report(priv, vpc_bit);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ideapad_laptop: add an event for mic mute hotkey
2016-06-03 8:33 ` Ike Panhc
@ 2016-06-07 21:54 ` Darren Hart
2016-06-08 3:26 ` Ike Panhc
0 siblings, 1 reply; 5+ messages in thread
From: Darren Hart @ 2016-06-07 21:54 UTC (permalink / raw)
To: Ike Panhc; +Cc: Alex Hung, platform-driver-x86
On Fri, Jun 03, 2016 at 04:33:34PM +0800, Ike Panhc wrote:
> On 05/30/2016 03:26 PM, Alex Hung wrote:
> > 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
> >
> > Signed-off-by: Alex Hung <alex.hung@canonical.com>
> > ---
> > drivers/platform/x86/ideapad-laptop.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> > index 4a23fbc..aa87a42 100644
> > --- a/drivers/platform/x86/ideapad-laptop.c
> > +++ b/drivers/platform/x86/ideapad-laptop.c
> > @@ -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:
>
> fall through is easier to read
>
> > + ideapad_input_report(priv, vpc_bit);
> > + break;
>
> so above two lines are not necessary.
Are you happy with the changes otherwise Ike?
>
> > case 7:
> > case 6:
> > ideapad_input_report(priv, vpc_bit);
> >
Thanks,
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ideapad_laptop: add an event for mic mute hotkey
2016-06-07 21:54 ` Darren Hart
@ 2016-06-08 3:26 ` Ike Panhc
2016-06-08 20:02 ` Darren Hart
0 siblings, 1 reply; 5+ messages in thread
From: Ike Panhc @ 2016-06-08 3:26 UTC (permalink / raw)
To: Darren Hart; +Cc: Alex Hung, platform-driver-x86
On 06/08/2016 05:54 AM, Darren Hart wrote:
> On Fri, Jun 03, 2016 at 04:33:34PM +0800, Ike Panhc wrote:
>> On 05/30/2016 03:26 PM, Alex Hung wrote:
>>> 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
>>>
>>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>>> ---
>>> drivers/platform/x86/ideapad-laptop.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>>> index 4a23fbc..aa87a42 100644
>>> --- a/drivers/platform/x86/ideapad-laptop.c
>>> +++ b/drivers/platform/x86/ideapad-laptop.c
>>> @@ -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:
>>
>> fall through is easier to read
>>
>>> + ideapad_input_report(priv, vpc_bit);
>>> + break;
>>
>> so above two lines are not necessary.
>
> Are you happy with the changes otherwise Ike?
>
>>
>>> case 7:
>>> case 6:
>>> ideapad_input_report(priv, vpc_bit);
>>>
>
> Thanks,
>
Yes. Looks good to me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ideapad_laptop: add an event for mic mute hotkey
2016-06-08 3:26 ` Ike Panhc
@ 2016-06-08 20:02 ` Darren Hart
0 siblings, 0 replies; 5+ messages in thread
From: Darren Hart @ 2016-06-08 20:02 UTC (permalink / raw)
To: Ike Panhc; +Cc: Alex Hung, platform-driver-x86
On Wed, Jun 08, 2016 at 11:26:44AM +0800, Ike Panhc wrote:
> On 06/08/2016 05:54 AM, Darren Hart wrote:
> > On Fri, Jun 03, 2016 at 04:33:34PM +0800, Ike Panhc wrote:
> >> On 05/30/2016 03:26 PM, Alex Hung wrote:
> >>> 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
> >>>
> >>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> >>> ---
> >>> drivers/platform/x86/ideapad-laptop.c | 4 ++++
> >>> 1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> >>> index 4a23fbc..aa87a42 100644
> >>> --- a/drivers/platform/x86/ideapad-laptop.c
> >>> +++ b/drivers/platform/x86/ideapad-laptop.c
> >>> @@ -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:
> >>
> >> fall through is easier to read
> >>
> >>> + ideapad_input_report(priv, vpc_bit);
> >>> + break;
> >>
> >> so above two lines are not necessary.
> >
> > Are you happy with the changes otherwise Ike?
> >
> >>
> >>> case 7:
> >>> case 6:
> >>> ideapad_input_report(priv, vpc_bit);
> >>>
> >
> > 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.
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-08 20:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30 7:26 [PATCH] ideapad_laptop: add an event for mic mute hotkey Alex Hung
2016-06-03 8:33 ` Ike Panhc
2016-06-07 21:54 ` Darren Hart
2016-06-08 3:26 ` Ike Panhc
2016-06-08 20:02 ` Darren Hart
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.