aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-03-06 20:14:41 -0500
committerDarren Hart <dvhart@linux.intel.com>2015-03-14 15:06:33 -0400
commitbab09e23ac9fd50c381668388cdf02b52af59d07 (patch)
tree1a0fbb92c3523a6901df70923a2c2a84e7f8f3d4
parentcc55c8997d130b5ecb448a8fee12359372df9c51 (diff)
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>
-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)
2770 case 0x80: /* Hotkeys and some system events */ 2770 case 0x80: /* Hotkeys and some system events */
2771 toshiba_acpi_process_hotkeys(dev); 2771 toshiba_acpi_process_hotkeys(dev);
2772 break; 2772 break;
2773 case 0x81: /* Dock events */
2774 case 0x82:
2775 case 0x83:
2776 pr_info("Dock event received %x\n", event);
2777 break;
2778 case 0x88: /* Thermal events */
2779 pr_info("Thermal event received\n");
2780 break;
2781 case 0x8f: /* LID closed */
2782 case 0x90: /* LID is closed and Dock has been ejected */
2783 break;
2784 case 0x8c: /* SATA power events */
2785 case 0x8b:
2786 pr_info("SATA power event received %x\n", event);
2787 break;
2773 case 0x92: /* Keyboard backlight mode changed */ 2788 case 0x92: /* Keyboard backlight mode changed */
2774 /* Update sysfs entries */ 2789 /* Update sysfs entries */
2775 ret = sysfs_update_group(&acpi_dev->dev.kobj, 2790 ret = sysfs_update_group(&acpi_dev->dev.kobj,
@@ -2777,17 +2792,19 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
2777 if (ret) 2792 if (ret)
2778 pr_err("Unable to update sysfs entries\n"); 2793 pr_err("Unable to update sysfs entries\n");
2779 break; 2794 break;
2780 case 0x81: /* Unknown */ 2795 case 0x85: /* Unknown */
2781 case 0x82: /* Unknown */ 2796 case 0x8d: /* Unknown */
2782 case 0x83: /* Unknown */
2783 case 0x8c: /* Unknown */
2784 case 0x8e: /* Unknown */ 2797 case 0x8e: /* Unknown */
2785 case 0x8f: /* Unknown */ 2798 case 0x94: /* Unknown */
2786 case 0x90: /* Unknown */ 2799 case 0x95: /* Unknown */
2787 default: 2800 default:
2788 pr_info("Unknown event received %x\n", event); 2801 pr_info("Unknown event received %x\n", event);
2789 break; 2802 break;
2790 } 2803 }
2804
2805 acpi_bus_generate_netlink_event(acpi_dev->pnp.device_class,
2806 dev_name(&acpi_dev->dev),
2807 event, 0);
2791} 2808}
2792 2809
2793#ifdef CONFIG_PM_SLEEP 2810#ifdef CONFIG_PM_SLEEP