public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Azael Avalos <coproscefalo@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink
Date: Fri, 20 Nov 2015 15:19:37 -0800	[thread overview]
Message-ID: <20151120231937.GD7413@malice.jf.intel.com> (raw)
In-Reply-To: <1447644827-404-1-git-send-email-coproscefalo@gmail.com>

On Sun, Nov 15, 2015 at 08:33:46PM -0700, Azael Avalos wrote:
> The driver uses genetlink to inform userspace of events generated by
> the system, but the data passed is always zero as there is no data to
> pass, except for the hotkey event.
> 
> This patch propagates the hotkey value via genetlink so userspace can
> make use of it.

Which keys were not working previously?

My concern is that we introduce new events that then get "double handled".

Some more context about the problem experienced and how this resolves it would
be helpful.

Thanks,

> 
> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
> ---
>  drivers/platform/x86/toshiba_acpi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
> index 7f71f8f..63c231a 100644
> --- a/drivers/platform/x86/toshiba_acpi.c
> +++ b/drivers/platform/x86/toshiba_acpi.c
> @@ -2966,7 +2966,8 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
>  
>  	acpi_bus_generate_netlink_event(acpi_dev->pnp.device_class,
>  					dev_name(&acpi_dev->dev),
> -					event, 0);
> +					event, (event == 0x80) ?
> +					dev->last_key_event : 0);
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> -- 
> 2.6.2
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center

  parent reply	other threads:[~2015-11-20 23:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16  3:33 [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink Azael Avalos
2015-11-16  3:33 ` [PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function Azael Avalos
2015-11-20 23:24   ` Darren Hart
2015-11-20 23:19 ` Darren Hart [this message]
2015-11-21  0:05   ` [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink Azael Avalos
2015-11-21  0:49     ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120231937.GD7413@malice.jf.intel.com \
    --to=dvhart@infradead.org \
    --cc=coproscefalo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox