Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
On Mon, Mar 28, 2011 at 09:12:54AM -0700, Azael Avalos wrote: > Hi there, > > Any updates on this patch? > I just saw a git-pull request, but I haven't seen this patch merged (yet). > > I have a slightly updated patch (with suspend/resume functions added > to workaround some issues on some Toshiba Netbooks) with some > testing done by Seth Forshee, just in case that I need to resend. Since the updates include a bugfix for hotkeys not working on the NB305 after suspend, I'd vote in favor of submitting the updated version. Cheers, Seth -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
Hi there, Any updates on this patch? I just saw a git-pull request, but I haven't seen this patch merged (yet). I have a slightly updated patch (with suspend/resume functions added to workaround some issues on some Toshiba Netbooks) with some testing done by Seth Forshee, just in case that I need to resend. Saludos Azael -- -- El mundo apesta y vosotros apestais tambien -- -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
On Wed, Jan 19, 2011 at 02:05:10PM -0700, Azael Avalos wrote: > > Some TOS1900 devices send keycodes via KBD, a filter was added > along with a cleanup made by Matthew Garrett, also functions > and registers were added for the Toshiba Software > Configuration Interface (SCI) used by Illumination. > Bumping its version to 0.20 > > Signed-off-by: Azael Avalos Input parts look good to me. Acked-by: Dmitry Torokhov Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
Hi,
Here's version 2 of the previous patch.
So far I've found 2 types of TOS1900 devices:
1 - The ones that need the EC handle to access the NTFY method
(Satellite X205 series, Satellite A135 series, NB600, among others)
and send events via KBC (called HCI type 2)
2 - Another kind sending events via ACPI (called HCI type 3)
Both TOS1900 kinds need the HCI_HOTKEY_EVENTS call to work,
however, HCI type 3 needs also the ENAB method executed.
>> -static const struct key_entry toshiba_acpi_keymap[] __initconst = {
>> +static struct key_entry toshiba_acpi_keymap[] = {
>
> Why are we losing constness here?
Sorry, my bad, corrected on this one.
>From 2cb24b10e0d60d5ba31df88f49e984d7b6ccb720 Mon Sep 17 00:00:00 2001
From: Azael Avalos
Date: Wed, 19 Jan 2011 13:58:16 -0700
Subject: [PATCH] toshiba_acpi: Additional TOS1900 devices support
Some TOS1900 devices send keycodes via KBD, a filter was added
along with a cleanup made by Matthew Garrett, also functions
and registers were added for the Toshiba Software
Configuration Interface (SCI) used by Illumination.
Bumping its version to 0.20
Signed-off-by: Azael Avalos
---
drivers/platform/x86/Kconfig|1 +
drivers/platform/x86/toshiba_acpi.c | 644 ---
2 files changed, 440 insertions(+), 205 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index faec777..56d1c3f 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -515,6 +515,7 @@ config ACPI_TOSHIBA
depends on BACKLIGHT_CLASS_DEVICE
depends on INPUT
depends on RFKILL || RFKILL = n
+ depends on SERIO_I8042
select INPUT_POLLDEV
select INPUT_SPARSEKMAP
---help---
diff --git a/drivers/platform/x86/toshiba_acpi.c
b/drivers/platform/x86/toshiba_acpi.c
index 4276da7..4d74117 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -5,6 +5,7 @@
* Copyright (C) 2002-2004 John Belmonte
* Copyright (C) 2008 Philip Langdale
* Copyright (C) 2010 Pierre Ducroquet
+ * Copyright (C) 2010 Azael Avalos
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,14 +36,13 @@
*
*/
-#define TOSHIBA_ACPI_VERSION "0.19"
+#define TOSHIBA_ACPI_VERSION "0.20"
#define PROC_INTERFACE_VERSION 1
#include
#include
#include
#include
-#include
#include
#include
#include
@@ -51,6 +51,9 @@
#include
#include
#include
+#include
+#include
+#include
#include
@@ -66,11 +69,9 @@ MODULE_LICENSE("GPL");
#define MY_INFO KERN_INFO MY_LOGPREFIX
/* Toshiba ACPI method paths */
-#define METHOD_LCD_BRIGHTNESS "\\_SB_.PCI0.VGA_.LCD_._BCM"
-#define TOSH_INTERFACE_1 "\\_SB_.VALD"
-#define TOSH_INTERFACE_2 "\\_SB_.VALZ"
#define METHOD_VIDEO_OUT "\\_SB_.VALX.DSSX"
-#define GHCI_METHOD".GHCI"
+
+#define TOSHIBA_FN_SCAN0x6e
/* Toshiba HCI interface definitions
*
@@ -84,23 +85,39 @@ MODULE_LICENSE("GPL");
#define HCI_WORDS 6
-/* operations */
+/* HCI operations */
#define HCI_SET0xff00
#define HCI_GET0xfe00
-
-/* return codes */
+/* SCI operations */
+#define SCI_SUPPORT_CHECK 0xf000
+#define SCI_OPEN 0xf100
+#define SCI_CLOSE 0xf200
+#define SCI_SET0xf400
+#define SCI_GET0xf300
+
+/* HCI return codes */
#define HCI_SUCCESS0x
#define HCI_FAILURE0x1000
#define HCI_NOT_SUPPORTED 0x8000
#define HCI_EMPTY 0x8c00
-
-/* registers */
+/* SCI return codes */
+#define SCI_NOT_SUPPORTED HCI_NOT_SUPPORTED
+#define SCI_ALREADY_OPEN 0x8100
+#define SCI_NOT_OPENED 0x8200
+#define SCI_INPUT_DATA_ERROR 0x8300
+#define SCI_NOT_PRESENT0x8600
+#define SCI_NOT_INSTALLED 0x8e00
+
+/* HCI registers */
#define HCI_FAN0x0004
#define HCI_SYSTEM_EVENT 0x0016
#define HCI_VIDEO_OUT 0x001c
#define HCI_HOTKEY_EVENT 0x001e
#define HCI_LCD_BRIGHTNESS 0x002a
#define HCI_WIRELESS 0x0056
+/* SCI registers */
+#define SCI_ILLUMINATION 0x014e
+#define SCI_ILLUM_TIMER0x015c
/* field definitions */
#define HCI_LCD_BRIGHTNESS_BITS3
@@ -114,6 +131,44 @@ MODULE_LICENSE("GPL");
#define HCI_WIRELESS_BT_ATTACH 0x40
#define HCI_WIRELESS_BT_POWER 0x80
+struct acpi_ec {
+ acpi_handle handle;
+ unsigned long gpe;
+ unsigned long command_addr;
+ unsigned long data_addr;
+ unsigned long global_lock;
+ unsigned long f
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
Hi Azael,
On Mon, Jan 17, 2011 at 10:45:01AM -0700, Azael Avalos wrote:
>
> -static const struct key_entry toshiba_acpi_keymap[] __initconst = {
> +static struct key_entry toshiba_acpi_keymap[] = {
Why are we losing constness here?
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
Hi, On Mon, Jan 17, 2011 at 10:55 AM, Matthew Garrett wrote: > I think this needs to be tidied up some more to interact nicely with the > ec driver, and I'm still a bit concerned that there may be devices of > the TOS1900 type that implement the old-syle interface but not this one > (I'll check the files I have here). I'll try to break this up into > something more generic. So far I've seen 3 types of TOS1900 devices 1 - The ones that the ENAB call is sufficient to enable hotkeys 2 - Another kind using HCI_HOTKEY_EVENTS call (and using the EC to access the NTFY method) 3 - My current laptop (Qosmio X505) which the ENAB and/or the HCI_HOTKEY_EVENTS calls don't work... I've already asked Toshiba for info on this, but there's no ETA on when I'll get it. Saludos Azael Avalos -- -- El mundo apesta y vosotros apestais tambien -- -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] toshiba_acpi: Additional TOS1900 devices support
I think this needs to be tidied up some more to interact nicely with the ec driver, and I'm still a bit concerned that there may be devices of the TOS1900 type that implement the old-syle interface but not this one (I'll check the files I have here). I'll try to break this up into something more generic. -- Matthew Garrett | [email protected] -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
