lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1392269277-16391-4-git-send-email-dmitry.torokhov@gmail.com>
Date:	Wed, 12 Feb 2014 21:27:50 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Christopher Heiny <cheiny@...aptics.com>
Cc:	Andrew Duggan <aduggan@...aptics.com>,
	Vincent Huang <vincent.huang@...synaptics.com>,
	Vivian Ly <vly@...aptics.com>,
	Daniel Rosenberg <daniel.rosenberg@...aptics.com>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Courtney Cavin <courtney.cavin@...ymobile.com>,
	Linux Input <linux-input@...r.kernel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH 04/11] Input: synaptics-rmi4 - fix LTS handling in F01

From: Christopher Heiny <cheiny@...aptics.com>

Both F01_RMI_Ctrl2 and F01_RMI_Ctrl3 (doze_interval and wakeup_threshold)
are controlled by the has_adjustable_doze bit.

Signed-off-by: Christopher Heiny<cheiny@...aptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
 drivers/input/rmi4/rmi_f01.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
index 976aba3..30e0b50 100644
--- a/drivers/input/rmi4/rmi_f01.c
+++ b/drivers/input/rmi4/rmi_f01.c
@@ -328,6 +328,9 @@ static int rmi_f01_initialize(struct rmi_function *fn)
 		}
 	}
 
+	if (data->properties.has_lts)
+		ctrl_base_addr++;
+
 	if (data->properties.has_adjustable_doze_holdoff) {
 		data->doze_holdoff_addr = ctrl_base_addr;
 		ctrl_base_addr++;
@@ -383,7 +386,7 @@ static int rmi_f01_config(struct rmi_function *fn)
 		dev_err(&fn->dev, "Failed to write interrupt enable.\n");
 		return retval;
 	}
-	if (data->properties.has_lts) {
+	if (data->properties.has_adjustable_doze) {
 		retval = rmi_write_block(fn->rmi_dev, data->doze_interval_addr,
 					 &data->device_control.doze_interval,
 					 sizeof(u8));
@@ -391,9 +394,7 @@ static int rmi_f01_config(struct rmi_function *fn)
 			dev_err(&fn->dev, "Failed to write doze interval.\n");
 			return retval;
 		}
-	}
 
-	if (data->properties.has_adjustable_doze) {
 		retval = rmi_write_block(fn->rmi_dev,
 					 data->wakeup_threshold_addr,
 					 &data->device_control.wakeup_threshold,
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ