summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-03-06 18:14:41 -0700
committerDarren Hart <dvhart@linux.intel.com>2015-03-14 12:06:33 -0700
commitbab09e23ac9fd50c381668388cdf02b52af59d07 (patch)
tree1a0fbb92c3523a6901df70923a2c2a84e7f8f3d4 /drivers
parentcc55c8997d130b5ecb448a8fee12359372df9c51 (diff)
downloadlinux-stable-bab09e23ac9fd50c381668388cdf02b52af59d07.tar.gz
linux-stable-bab09e23ac9fd50c381668388cdf02b52af59d07.tar.bz2
linux-stable-bab09e23ac9fd50c381668388cdf02b52af59d07.zip
toshiba_acpi: Update events in toshiba_acpi_notify
This patch adds a few more events sent to TOSXXXX devices, some of them are already identified, while some others simply print a message informing the type of event received. Also, a netlink event is generated so that userspace apps, daemons, etc. act accordingly to these events. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/toshiba_acpi.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index dbcb7a8915b8..5009d8539c50 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -2770,6 +2770,21 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
case 0x80: /* Hotkeys and some system events */
toshiba_acpi_process_hotkeys(dev);
break;
+ case 0x81: /* Dock events */
+ case 0x82:
+ case 0x83:
+ pr_info("Dock event received %x\n", event);
+ break;
+ case 0x88: /* Thermal events */
+ pr_info("Thermal event received\n");
+ break;
+ case 0x8f: /* LID closed */
+ case 0x90: /* LID is closed and Dock has been ejected */
+ break;
+ case 0x8c: /* SATA power events */
+ case 0x8b:
+ pr_info("SATA power event received %x\n", event);
+ break;
case 0x92: /* Keyboard backlight mode changed */
/* Update sysfs entries */
ret = sysfs_update_group(&acpi_dev->dev.kobj,
@@ -2777,17 +2792,19 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
if (ret)
pr_err("Unable to update sysfs entries\n");
break;
- case 0x81: /* Unknown */
- case 0x82: /* Unknown */
- case 0x83: /* Unknown */
- case 0x8c: /* Unknown */
+ case 0x85: /* Unknown */
+ case 0x8d: /* Unknown */
case 0x8e: /* Unknown */
- case 0x8f: /* Unknown */
- case 0x90: /* Unknown */
+ case 0x94: /* Unknown */
+ case 0x95: /* Unknown */
default:
pr_info("Unknown event received %x\n", event);
break;
}
+
+ acpi_bus_generate_netlink_event(acpi_dev->pnp.device_class,
+ dev_name(&acpi_dev->dev),
+ event, 0);
}
#ifdef CONFIG_PM_SLEEP