summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ Keerthy <j-keerthy@ti.com>2012-03-14 14:08:22 +0800
committerAndy Green <andy.green@linaro.org>2012-06-20 10:27:42 +0800
commita391e77a43c64a0e30da8f237ebe728effaddb6c (patch)
tree2d3f86d8031ced5d47a5f9fab7d556bae94e9bf5
parent797d1a39a5bc44e31ac7623980ac6a9eb5261280 (diff)
Change the time for Long press Key from 12S to 6S
Change the time for Long press Key from 12S to 6S Signed-off-by: J Keerthy <j-keerthy@ti.com>
-rw-r--r--drivers/input/misc/palmas-pwrbutton.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index 7cf30eb7143..3a834e0e163 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -64,6 +64,7 @@ static int __init palmas_pwron_probe(struct platform_device *pdev)
struct palmas_pwron *pwron;
int irq = platform_get_irq_byname(pdev, "PWRON_BUTTON");
int err;
+ u8 value;
pwron = kzalloc(sizeof(*pwron), GFP_KERNEL);
if (!pwron) {
@@ -87,6 +88,15 @@ static int __init palmas_pwron_probe(struct platform_device *pdev)
pwron->palmas = palmas;
pwron->input_dev = input_dev;
+ /* Read the LONG_PRESS_KEY register */
+ palmas->read(palmas, PALMAS_PMU_CONTROL_BASE, PALMAS_LONG_PRESS_KEY,
+ &value);
+
+ /* 6 Seconds as the LPK_TIME Long Press Key Time */
+ value = value & 0xF3;
+ palmas->write(palmas, PALMAS_PMU_CONTROL_BASE, PALMAS_LONG_PRESS_KEY,
+ value);
+
err = request_threaded_irq(irq, NULL, pwron_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
"palmas_pwron", pwron);