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


Groups > linux.kernel > #1269835 > unrolled thread

[PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink

Started byAzael Avalos <coproscefalo@gmail.com>
First post2015-11-16 04:40 +0100
Last post2015-11-21 01:50 +0100
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink Azael Avalos <coproscefalo@gmail.com> - 2015-11-16 04:40 +0100
    [PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function Azael Avalos <coproscefalo@gmail.com> - 2015-11-16 04:40 +0100
      Re: [PATCH] toshiba_bluetooth: Add missing newline in  toshiba_bluetooth_present function Darren Hart <dvhart@infradead.org> - 2015-11-21 00:30 +0100
    Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via  genetlink Darren Hart <dvhart@infradead.org> - 2015-11-21 00:20 +0100
      Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink Azael Avalos <coproscefalo@gmail.com> - 2015-11-21 01:10 +0100
        Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via  genetlink Darren Hart <dvhart@infradead.org> - 2015-11-21 01:50 +0100

#1269835 — [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink

FromAzael Avalos <coproscefalo@gmail.com>
Date2015-11-16 04:40 +0100
Subject[PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink
Message-ID<qviO5-20s-11@gated-at.bofh.it>
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.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1269837 — [PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function

FromAzael Avalos <coproscefalo@gmail.com>
Date2015-11-16 04:40 +0100
Subject[PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function
Message-ID<qviO6-20s-19@gated-at.bofh.it>
In reply to#1269835
This patch simply adds a missing newline in the error string printed
by the toshiba_bluetooth_present function.

This is just a cosmetic change, no functionality was changed.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_bluetooth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
index c5e4508..5db495d 100644
--- a/drivers/platform/x86/toshiba_bluetooth.c
+++ b/drivers/platform/x86/toshiba_bluetooth.c
@@ -78,7 +78,7 @@ static int toshiba_bluetooth_present(acpi_handle handle)
 	 */
 	result = acpi_evaluate_integer(handle, "_STA", NULL, &bt_present);
 	if (ACPI_FAILURE(result)) {
-		pr_err("ACPI call to query Bluetooth presence failed");
+		pr_err("ACPI call to query Bluetooth presence failed\n");
 		return -ENXIO;
 	} else if (!bt_present) {
 		pr_info("Bluetooth device not present\n");
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1274486 — Re: [PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function

FromDarren Hart <dvhart@infradead.org>
Date2015-11-21 00:30 +0100
SubjectRe: [PATCH] toshiba_bluetooth: Add missing newline in toshiba_bluetooth_present function
Message-ID<qx3hU-5yW-19@gated-at.bofh.it>
In reply to#1269837
On Sun, Nov 15, 2015 at 08:33:47PM -0700, Azael Avalos wrote:
> This patch simply adds a missing newline in the error string printed
> by the toshiba_bluetooth_present function.
> 
> This is just a cosmetic change, no functionality was changed.
> 
> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>

Thanks, applied.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1274476 — Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink

FromDarren Hart <dvhart@infradead.org>
Date2015-11-21 00:20 +0100
SubjectRe: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink
Message-ID<qx38e-5vv-11@gated-at.bofh.it>
In reply to#1269835
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1274554

FromAzael Avalos <coproscefalo@gmail.com>
Date2015-11-21 01:10 +0100
Message-ID<qx3UB-63i-3@gated-at.bofh.it>
In reply to#1274476
Hi Darren,

2015-11-20 16:19 GMT-07:00 Darren Hart <dvhart@infradead.org>:
> 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?

It's not about the keys, but the "extra events" generated, I still do not
know why Toshiba sent system events inside the hotkey event (maybe
they ran out of numbers...).

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

Well, the events are already being generated, but they are Toshiba specific
events, the only thing here that changed is that now we pass the hotkey value
to userspace, and as said, some of the system events that were not passed
before and are not handled at all.

A good example here are the 0x1ABE and 0x1ABF events, which fire (on
certain laptops) when the HDD protection level changes and is disabled
respectively.

There a re a lot of unknown events that are being sent as hotkeys, but
I still have to ideintify them :-(

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

Cheers
Azael


-- 
-- El mundo apesta y vosotros apestais tambien --
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1274576 — Re: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink

FromDarren Hart <dvhart@infradead.org>
Date2015-11-21 01:50 +0100
SubjectRe: [PATCH 1/1] toshiba_acpi: Propagate the hotkey value via genetlink
Message-ID<qx4xj-6i8-9@gated-at.bofh.it>
In reply to#1274554
On Fri, Nov 20, 2015 at 05:05:37PM -0700, Azael Avalos wrote:
> Hi Darren,
> 
> 2015-11-20 16:19 GMT-07:00 Darren Hart <dvhart@infradead.org>:
> > 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?
> 
> It's not about the keys, but the "extra events" generated, I still do not
> know why Toshiba sent system events inside the hotkey event (maybe
> they ran out of numbers...).
> 
> >
> > My concern is that we introduce new events that then get "double handled".
> >
> 
> Well, the events are already being generated, but they are Toshiba specific
> events, the only thing here that changed is that now we pass the hotkey value
> to userspace, and as said, some of the system events that were not passed
> before and are not handled at all.
> 
> A good example here are the 0x1ABE and 0x1ABF events, which fire (on
> certain laptops) when the HDD protection level changes and is disabled
> respectively.
> 
> There a re a lot of unknown events that are being sent as hotkeys, but
> I still have to ideintify them :-(

Thanks for the context, queued to testing.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web