From: Azael Avalos <coproscefalo@gmail.com>
To: Darren Hart <dvhart@infradead.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Azael Avalos <coproscefalo@gmail.com>
Subject: [PATCH v2 3/3] toshiba_acpi: Add keyboard backlight mode change event
Date: Wed, 3 Dec 2014 23:42:05 -0700 [thread overview]
Message-ID: <1417675325-14921-4-git-send-email-coproscefalo@gmail.com> (raw)
In-Reply-To: <1417675325-14921-1-git-send-email-coproscefalo@gmail.com>
A previous patch added support to handle more events.
This patch adds support to update the sysfs group whenever we receive
a 0x92 event, which indicates a change in the keyboard backlight mode.
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
drivers/platform/x86/toshiba_acpi.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 21ac11f..5e9b298 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -1393,12 +1393,6 @@ static ssize_t toshiba_kbd_bl_mode_store(struct device *dev,
if (ret)
return ret;
- /* Update sysfs entries on successful mode change*/
- ret = sysfs_update_group(&toshiba->acpi_dev->dev.kobj,
- &toshiba_attr_group);
- if (ret)
- return ret;
-
toshiba->kbd_mode = mode;
}
@@ -2014,6 +2008,13 @@ 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 0x92: /* Keyboard backlight mode changed */
+ /* Update sysfs entries */
+ ret = sysfs_update_group(&acpi_dev->dev.kobj,
+ &toshiba_attr_group);
+ if (ret)
+ pr_err("Unable to update sysfs entries\n");
+ break;
case 0x81: /* Unknown */
case 0x82: /* Unknown */
case 0x83: /* Unknown */
--
2.1.2
prev parent reply other threads:[~2014-12-04 6:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 6:42 [PATCH v2 0/3] toshiba_acpi: Hotkeys and event handling changes Azael Avalos
2014-12-04 6:42 ` [PATCH v2 1/3] toshiba_acpi: Move hotkey enabling code to own function Azael Avalos
2014-12-04 6:42 ` [PATCH v2 2/3] toshiba_acpi: Change notify funtion to handle more events Azael Avalos
2014-12-03 13:12 ` Darren Hart
2014-12-05 3:10 ` Azael Avalos
2014-12-03 13:19 ` Darren Hart
2014-12-04 6:42 ` Azael Avalos [this message]
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=1417675325-14921-4-git-send-email-coproscefalo@gmail.com \
--to=coproscefalo@gmail.com \
--cc=dvhart@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.