- hdaps-delay-calibration-to-first-hardware-query.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     hdaps: delay calibration to first hardware query

has been removed from the -mm tree.  Its filename is

     hdaps-delay-calibration-to-first-hardware-query.patch

This patch was dropped because we shall not be accepting anonymous contributions, sorry.

------------------------------------------------------
Subject: hdaps: delay calibration to first hardware query
From: Shem Multinymous <multinymous@xxxxxxxxx>

The hdaps driver currently calibrates its rest position upon initialization,
which can take several seconds on first module load (and delays the boot
process accordingly).  This patch delays calibration to the first successful
hardware query, when the information is available anyway.  Writes to the
"calibrate" sysfs attribute are handled likewise.

Signed-off-by: Shem Multinymous <multinymous@xxxxxxxxx>
Signed-off-by: Pavel Machek <pavel@xxxxxxx>
Acked-by: Robert Love <rml@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/hwmon/hdaps.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff -puN drivers/hwmon/hdaps.c~hdaps-delay-calibration-to-first-hardware-query drivers/hwmon/hdaps.c
--- a/drivers/hwmon/hdaps.c~hdaps-delay-calibration-to-first-hardware-query
+++ a/drivers/hwmon/hdaps.c
@@ -66,6 +66,7 @@ static struct timer_list hdaps_timer;
 static struct platform_device *pdev;
 static struct input_dev *hdaps_idev;
 static unsigned int hdaps_invert;
+static int needs_calibration;
 
 /* Latest state readout: */
 static int pos_x, pos_y;      /* position */
@@ -137,6 +138,12 @@ static int __hdaps_update(int fast)
 	temperature = data.val[EC_ACCEL_IDX_TEMP1];
 
 	stale_readout = 0;
+	if (needs_calibration) {
+		rest_x = pos_x;
+		rest_y = pos_y;
+		needs_calibration = 0;
+	}
+
 	return 0;
 }
 
@@ -288,9 +295,9 @@ static struct platform_driver hdaps_driv
  */
 static void hdaps_calibrate(void)
 {
+	needs_calibration = 1;
 	hdaps_update();
-	rest_x = pos_x;
-	rest_y = pos_y;
+	/* If that fails, the mousedev poll will take care of things later. */
 }
 
 /* Timer handler for updating the input device. Runs in softirq context,
@@ -520,8 +527,8 @@ static int __init hdaps_init(void)
 		goto out_group;
 	}
 
-	/* initial calibrate for the input device */
-	hdaps_calibrate();
+	/* calibration for the input device (deferred to avoid delay) */
+	needs_calibration = 1;
 
 	/* initialize the input class */
 	hdaps_idev->name = "hdaps";
_

Patches currently in -mm which might be from multinymous@xxxxxxxxx are

dmi-decode-and-save-oem-string-information.patch
hdaps-delay-calibration-to-first-hardware-query.patch
hdaps-add-explicit-hardware-configuration-functions.patch
hdaps-add-explicit-hardware-configuration-functions-fix.patch
hdaps-add-new-sysfs-attributes.patch
hdaps-power-off-accelerometer-on-suspend-and-unload.patch
hdaps-stop-polling-timer-when-suspended.patch
hdaps-simplify-whitelist.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux