Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630002 > unrolled thread

[PATCH] platform/x86/intel-vbtn: add volume up and down

Started byMaarten Maathuis <madman2003@gmail.com>
First post2017-04-24 22:50 +0200
Last post2017-04-24 23:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] platform/x86/intel-vbtn: add volume up and down Maarten Maathuis <madman2003@gmail.com> - 2017-04-24 22:50 +0200
    Re: [PATCH] platform/x86/intel-vbtn: add volume up and down Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-24 23:00 +0200
      Re: [PATCH] platform/x86/intel-vbtn: add volume up and down Maarten Maathuis <madman2003@gmail.com> - 2017-04-24 23:40 +0200

#1630002 — [PATCH] platform/x86/intel-vbtn: add volume up and down

FromMaarten Maathuis <madman2003@gmail.com>
Date2017-04-24 22:50 +0200
Subject[PATCH] platform/x86/intel-vbtn: add volume up and down
Message-ID<tzT5L-3lh-13@gated-at.bofh.it>
Tested on HP Elite X2 1012 G1.
Matches event report of Lenovo Helix 2
(https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html).
---
 drivers/platform/x86/intel-vbtn.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 554e82ebe83c..1fbebbad350d 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -35,8 +35,12 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
 
 /* In theory, these are HID usages. */
 static const struct key_entry intel_vbtn_keymap[] = {
-	{ KE_IGNORE, 0xC0, { KEY_POWER } },	/* power key press */
-	{ KE_KEY, 0xC1, { KEY_POWER } },	/* power key release */
+	{ KE_IGNORE, 0xC0, { KEY_POWER } },	 /* power key press */
+	{ KE_KEY, 0xC1, { KEY_POWER } },	 /* power key release */
+	{ KE_KEY, 0xC4, { KEY_VOLUMEUP} },	 /* volume-up key press */
+	{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } },	 /* volume-up key release */
+	{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN} },	 /* volume-down key press */
+	{ KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */
 	{ KE_END },
 };
 
-- 
2.12.2

[toc] | [next] | [standalone]


#1630009

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-04-24 23:00 +0200
Message-ID<tzTfr-3pE-11@gated-at.bofh.it>
In reply to#1630002
On Mon, Apr 24, 2017 at 11:47 PM, Maarten Maathuis <madman2003@gmail.com> wrote:
> Tested on HP Elite X2 1012 G1.
> Matches event report of Lenovo Helix 2
> (https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html).

Thanks for the patch.

A bit of work still required.

According to Submitting Patches document [1] we need your Signed-off-by tag.

Besides that see my comment below.

[1] https://www.kernel.org/doc/Documentation/process/submitting-patches.rst


> ---
>  drivers/platform/x86/intel-vbtn.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
> index 554e82ebe83c..1fbebbad350d 100644
> --- a/drivers/platform/x86/intel-vbtn.c
> +++ b/drivers/platform/x86/intel-vbtn.c
> @@ -35,8 +35,12 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
>
>  /* In theory, these are HID usages. */
>  static const struct key_entry intel_vbtn_keymap[] = {

> -       { KE_IGNORE, 0xC0, { KEY_POWER } },     /* power key press */
> -       { KE_KEY, 0xC1, { KEY_POWER } },        /* power key release */
> +       { KE_IGNORE, 0xC0, { KEY_POWER } },      /* power key press */
> +       { KE_KEY, 0xC1, { KEY_POWER } },         /* power key release */

As far as I can see nothing should happen on these lines. I think your
editor (or maybe email setup) is configured somehow wrongly. We expect
TAB as an indentation starter.

We also encourage to use git send-email tool instead of manual
submitting patches through some (broken) MUAs.

> +       { KE_KEY, 0xC4, { KEY_VOLUMEUP} },       /* volume-up key press */
> +       { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } },   /* volume-up key release */
> +       { KE_KEY, 0xC6, { KEY_VOLUMEDOWN} },     /* volume-down key press */
> +       { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */
>         { KE_END },

-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [next] | [standalone]


#1630052

FromMaarten Maathuis <madman2003@gmail.com>
Date2017-04-24 23:40 +0200
Message-ID<tzTSa-3S5-23@gated-at.bofh.it>
In reply to#1630009
On Mon, Apr 24, 2017 at 10:55 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, Apr 24, 2017 at 11:47 PM, Maarten Maathuis <madman2003@gmail.com> wrote:
>> Tested on HP Elite X2 1012 G1.
>> Matches event report of Lenovo Helix 2
>> (https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html).
>
> Thanks for the patch.
>
> A bit of work still required.
>
> According to Submitting Patches document [1] we need your Signed-off-by tag.
>
> Besides that see my comment below.
>
> [1] https://www.kernel.org/doc/Documentation/process/submitting-patches.rst
>
>
>> ---
>>  drivers/platform/x86/intel-vbtn.c | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
>> index 554e82ebe83c..1fbebbad350d 100644
>> --- a/drivers/platform/x86/intel-vbtn.c
>> +++ b/drivers/platform/x86/intel-vbtn.c
>> @@ -35,8 +35,12 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
>>
>>  /* In theory, these are HID usages. */
>>  static const struct key_entry intel_vbtn_keymap[] = {
>
>> -       { KE_IGNORE, 0xC0, { KEY_POWER } },     /* power key press */
>> -       { KE_KEY, 0xC1, { KEY_POWER } },        /* power key release */
>> +       { KE_IGNORE, 0xC0, { KEY_POWER } },      /* power key press */
>> +       { KE_KEY, 0xC1, { KEY_POWER } },         /* power key release */
>
> As far as I can see nothing should happen on these lines. I think your
> editor (or maybe email setup) is configured somehow wrongly. We expect
> TAB as an indentation starter.
>
> We also encourage to use git send-email tool instead of manual
> submitting patches through some (broken) MUAs.

I fell back to an other SMTP server, until i can find a structural
long term solution.
The difference in the other two lines was due to a misunderstanding
about indenting
policy. hopefully it's better now.

>
>> +       { KE_KEY, 0xC4, { KEY_VOLUMEUP} },       /* volume-up key press */
>> +       { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } },   /* volume-up key release */
>> +       { KE_KEY, 0xC6, { KEY_VOLUMEDOWN} },     /* volume-down key press */
>> +       { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */
>>         { KE_END },
>
> --
> With Best Regards,
> Andy Shevchenko



-- 
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web