* [PATCH 0/3] fujitsu-tablet patches for 3.4
@ 2012-04-03 20:34 Robert Gerlach
2012-04-03 20:34 ` [PATCH 1/3] fujitsu-tablet: remove duplicated code Robert Gerlach
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Robert Gerlach @ 2012-04-03 20:34 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Robert Gerlach
There are 2 trivial cleanups and 1 bugfix for the Fujitsu tablet extras driver.
Robert Gerlach (3):
fujitsu-tablet: remove duplicated code
fujitsu-tablet: convert printk to pr_*
fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] fujitsu-tablet: remove duplicated code
2012-04-03 20:34 [PATCH 0/3] fujitsu-tablet patches for 3.4 Robert Gerlach
@ 2012-04-03 20:34 ` Robert Gerlach
2012-04-03 20:34 ` [PATCH 2/3] fujitsu-tablet: convert printk to pr_* Robert Gerlach
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Robert Gerlach @ 2012-04-03 20:34 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Robert Gerlach
Signed-off-by: Robert Gerlach <khnz@gmx.de>
---
drivers/platform/x86/fujitsu-tablet.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
index 580d80a..4830f5d 100644
--- a/drivers/platform/x86/fujitsu-tablet.c
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -221,9 +221,6 @@ static int __devinit input_fujitsu_setup(struct device *parent,
input_set_capability(idev, EV_SW, SW_DOCK);
input_set_capability(idev, EV_SW, SW_TABLET_MODE);
- input_set_capability(idev, EV_SW, SW_DOCK);
- input_set_capability(idev, EV_SW, SW_TABLET_MODE);
-
error = input_register_device(idev);
if (error) {
input_free_device(idev);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] fujitsu-tablet: convert printk to pr_*
2012-04-03 20:34 [PATCH 0/3] fujitsu-tablet patches for 3.4 Robert Gerlach
2012-04-03 20:34 ` [PATCH 1/3] fujitsu-tablet: remove duplicated code Robert Gerlach
@ 2012-04-03 20:34 ` Robert Gerlach
2012-04-03 20:34 ` [PATCH 3/3] fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets Robert Gerlach
2012-05-03 20:34 ` [PATCH 0/3] fujitsu-tablet patches for 3.4 Matthew Garrett
3 siblings, 0 replies; 5+ messages in thread
From: Robert Gerlach @ 2012-04-03 20:34 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Robert Gerlach
Signed-off-by: Robert Gerlach <khnz@gmx.de>
---
drivers/platform/x86/fujitsu-tablet.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
index 4830f5d..8b74fdf 100644
--- a/drivers/platform/x86/fujitsu-tablet.c
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -16,6 +16,8 @@
* 59 Temple Place Suite 330, Boston, MA 02111-1307, USA.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -274,7 +276,7 @@ static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
static int __devinit fujitsu_dmi_default(const struct dmi_system_id *dmi)
{
- printk(KERN_INFO MODULENAME ": %s\n", dmi->ident);
+ pr_info("%s\n", dmi->ident);
memcpy(fujitsu.config.keymap, dmi->driver_data,
sizeof(fujitsu.config.keymap));
return 1;
--
1.7.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets
2012-04-03 20:34 [PATCH 0/3] fujitsu-tablet patches for 3.4 Robert Gerlach
2012-04-03 20:34 ` [PATCH 1/3] fujitsu-tablet: remove duplicated code Robert Gerlach
2012-04-03 20:34 ` [PATCH 2/3] fujitsu-tablet: convert printk to pr_* Robert Gerlach
@ 2012-04-03 20:34 ` Robert Gerlach
2012-05-03 20:34 ` [PATCH 0/3] fujitsu-tablet patches for 3.4 Matthew Garrett
3 siblings, 0 replies; 5+ messages in thread
From: Robert Gerlach @ 2012-04-03 20:34 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Robert Gerlach
This patch adds a quirk to fix the dock detection for Fujitsu Stylistic
devices and fixes an bug in which tablet mode state was not correctly
reported in Fujitsu Lifebook and Stylistic models.
Signed-off-by: Robert Gerlach <khnz@gmx.de>
---
drivers/platform/x86/fujitsu-tablet.c | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
index 8b74fdf..da267ea 100644
--- a/drivers/platform/x86/fujitsu-tablet.c
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -36,7 +36,8 @@
#define ACPI_FUJITSU_CLASS "fujitsu"
#define INVERT_TABLET_MODE_BIT 0x01
-#define FORCE_TABLET_MODE_IF_UNDOCK 0x02
+#define INVERT_DOCK_STATE_BIT 0x02
+#define FORCE_TABLET_MODE_IF_UNDOCK 0x04
#define KEYMAP_LEN 16
@@ -163,6 +164,8 @@ static void fujitsu_send_state(void)
state = fujitsu_read_register(0xdd);
dock = state & 0x02;
+ if (fujitsu.config.quirks & INVERT_DOCK_STATE_BIT)
+ dock = !dock;
if ((fujitsu.config.quirks & FORCE_TABLET_MODE_IF_UNDOCK) && (!dock)) {
tablet_mode = 1;
@@ -274,25 +277,31 @@ static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static int __devinit fujitsu_dmi_default(const struct dmi_system_id *dmi)
+static void __devinit fujitsu_dmi_common(const struct dmi_system_id *dmi)
{
pr_info("%s\n", dmi->ident);
memcpy(fujitsu.config.keymap, dmi->driver_data,
sizeof(fujitsu.config.keymap));
+}
+
+static int __devinit fujitsu_dmi_lifebook(const struct dmi_system_id *dmi)
+{
+ fujitsu_dmi_common(dmi);
+ fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
return 1;
}
static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi)
{
- fujitsu_dmi_default(dmi);
+ fujitsu_dmi_common(dmi);
fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK;
- fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
+ fujitsu.config.quirks |= INVERT_DOCK_STATE_BIT;
return 1;
}
static struct dmi_system_id dmi_ids[] __initconst = {
{
- .callback = fujitsu_dmi_default,
+ .callback = fujitsu_dmi_lifebook,
.ident = "Fujitsu Siemens P/T Series",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
@@ -301,7 +310,7 @@ static struct dmi_system_id dmi_ids[] __initconst = {
.driver_data = keymap_Lifebook_Tseries
},
{
- .callback = fujitsu_dmi_default,
+ .callback = fujitsu_dmi_lifebook,
.ident = "Fujitsu Lifebook T Series",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
@@ -319,7 +328,7 @@ static struct dmi_system_id dmi_ids[] __initconst = {
.driver_data = keymap_Stylistic_Tseries
},
{
- .callback = fujitsu_dmi_default,
+ .callback = fujitsu_dmi_lifebook,
.ident = "Fujitsu LifeBook U810",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
@@ -346,7 +355,7 @@ static struct dmi_system_id dmi_ids[] __initconst = {
.driver_data = keymap_Stylistic_ST5xxx
},
{
- .callback = fujitsu_dmi_default,
+ .callback = fujitsu_dmi_lifebook,
.ident = "Unknown (using defaults)",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, ""),
@@ -472,6 +481,6 @@ module_exit(fujitsu_module_exit);
MODULE_AUTHOR("Robert Gerlach <khnz@gmx.de>");
MODULE_DESCRIPTION("Fujitsu tablet pc extras driver");
MODULE_LICENSE("GPL");
-MODULE_VERSION("2.4");
+MODULE_VERSION("2.5");
MODULE_DEVICE_TABLE(acpi, fujitsu_ids);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] fujitsu-tablet patches for 3.4
2012-04-03 20:34 [PATCH 0/3] fujitsu-tablet patches for 3.4 Robert Gerlach
` (2 preceding siblings ...)
2012-04-03 20:34 ` [PATCH 3/3] fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets Robert Gerlach
@ 2012-05-03 20:34 ` Matthew Garrett
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Garrett @ 2012-05-03 20:34 UTC (permalink / raw)
To: Robert Gerlach; +Cc: platform-driver-x86
Applied the set to -next, thanks.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-03 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 20:34 [PATCH 0/3] fujitsu-tablet patches for 3.4 Robert Gerlach
2012-04-03 20:34 ` [PATCH 1/3] fujitsu-tablet: remove duplicated code Robert Gerlach
2012-04-03 20:34 ` [PATCH 2/3] fujitsu-tablet: convert printk to pr_* Robert Gerlach
2012-04-03 20:34 ` [PATCH 3/3] fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets Robert Gerlach
2012-05-03 20:34 ` [PATCH 0/3] fujitsu-tablet patches for 3.4 Matthew Garrett
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.