summaryrefslogtreecommitdiffstats
path: root/0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
diff options
context:
space:
mode:
authorNicolas Chauvet <kwizart@gmail.com>2014-06-02 21:51:28 +0200
committerNicolas Chauvet <kwizart@gmail.com>2014-07-07 16:21:17 +0200
commit33114ec6ba07e8ce38353b92a0554f9a71e83535 (patch)
tree2ef3cb36cdb930e79ff9dc7d0b12e0ad69b59790 /0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
parenta34e5ddbb0300885755e268f2f9ddab6bdbd284c (diff)
downloadkernel-33114ec6ba07e8ce38353b92a0554f9a71e83535.tar.gz
kernel-33114ec6ba07e8ce38353b92a0554f9a71e83535.tar.xz
kernel-33114ec6ba07e8ce38353b92a0554f9a71e83535.zip
Add marvin24s patches
Diffstat (limited to '0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch')
-rw-r--r--0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch b/0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
new file mode 100644
index 00000000..5ad1ccc6
--- /dev/null
+++ b/0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
@@ -0,0 +1,84 @@
+From 80fc2e686bf4b5b2f726241c77842bce23bd75e3 Mon Sep 17 00:00:00 2001
+From: Marc Dietrich <marvin24@gmx.de>
+Date: Tue, 11 Mar 2014 21:04:07 +0100
+Subject: [PATCH 4/6] NOT_FOR_UPSTREAM: staging: nvec: remove lid and power
+ events enable from core driver
+
+This is done now in the board specific driver.
+
+Signed-off-by: Marc Dietrich <marvin24@gmx.de>
+---
+ drivers/staging/nvec/nvec.c | 35 +----------------------------------
+ 1 file changed, 1 insertion(+), 34 deletions(-)
+
+diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
+index 3ee0b18..ae2ee77 100644
+--- a/drivers/staging/nvec/nvec.c
++++ b/drivers/staging/nvec/nvec.c
+@@ -75,10 +75,7 @@ enum nvec_sleep_subcmds {
+ AP_SUSPEND,
+ };
+
+-#define CNF_EVENT_REPORTING 0x01
+ #define GET_FIRMWARE_VERSION 0x15
+-#define LID_SWITCH BIT(1)
+-#define PWR_BUTTON BIT(15)
+
+ static struct nvec_chip *nvec_power_handle;
+
+@@ -350,27 +347,6 @@ static void nvec_toggle_global_events(struct nvec_chip *nvec, bool state)
+ }
+
+ /**
+- * nvec_event_mask - fill the command string with event bitfield
+- * ev: points to event command string
+- * mask: bit to insert into the event mask
+- *
+- * Configure event command expects a 32 bit bitfield which describes
+- * which events to enable. The bitfield has the following structure
+- * (from highest byte to lowest):
+- * system state bits 7-0
+- * system state bits 15-8
+- * oem system state bits 7-0
+- * oem system state bits 15-8
+- */
+-static void nvec_event_mask(char *ev, u32 mask)
+-{
+- ev[3] = mask >> 16 & 0xff;
+- ev[4] = mask >> 24 & 0xff;
+- ev[5] = mask >> 0 & 0xff;
+- ev[6] = mask >> 8 & 0xff;
+-}
+-
+-/**
+ * nvec_request_master - Process outgoing messages
+ * @work: A &struct work_struct (the tx_worker member of &struct nvec_chip)
+ *
+@@ -799,8 +775,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
+ struct resource *res;
+ void __iomem *base;
+ char get_firmware_version[] = { NVEC_CNTL, GET_FIRMWARE_VERSION },
+- unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 },
+- enable_event[7] = { NVEC_SYS, CNF_EVENT_REPORTING, true };
++ unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 };
+
+ if (!pdev->dev.of_node) {
+ dev_err(&pdev->dev, "must be instantiated using device tree\n");
+@@ -903,14 +878,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
+ /* unmute speakers? */
+ nvec_write_async(nvec, unmute_speakers, 4);
+
+- /* enable lid switch event */
+- nvec_event_mask(enable_event, LID_SWITCH);
+- nvec_write_async(nvec, enable_event, 7);
+-
+- /* enable power button event */
+- nvec_event_mask(enable_event, PWR_BUTTON);
+- nvec_write_async(nvec, enable_event, 7);
+-
+ return 0;
+ }
+
+--
+1.8.3.1
+