Message ID | 1447644827-404-1-git-send-email-coproscefalo@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
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 > >
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
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.
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
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(-)