All of lore.kernel.org
 help / color / mirror / Atom feed
* + lis3-fix-regression-of-hp-driveguard-with-8bit-chip.patch added to -mm tree
@ 2011-09-29 21:01 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-09-29 21:01 UTC (permalink / raw)
  To: mm-commits; +Cc: tiwai, eric.piel, samu.p.onkalo, stable


The patch titled
     Subject: lis3: fix regression of HP DriveGuard with 8bit chip
has been added to the -mm tree.  Its filename is
     lis3-fix-regression-of-hp-driveguard-with-8bit-chip.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Takashi Iwai <tiwai@suse.de>
Subject: lis3: fix regression of HP DriveGuard with 8bit chip

Commit 2a7fade7e03 ("hwmon: lis3: Power on corrections") caused a
regression on HP laptops with 8bit chip.  Writing CTRL2_BOOT_8B bit seems
clearing the BIOS setup, and no proper interrupt for DriveGuard will be
triggered any more.

Since the init code there is basically only for embedded devices, put a
pdata check so that the problematic initialization will be skipped for
hp_accel stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@google.com>
---

 drivers/misc/lis3lv02d/lis3lv02d.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff -puN drivers/misc/lis3lv02d/lis3lv02d.c~lis3-fix-regression-of-hp-driveguard-with-8bit-chip drivers/misc/lis3lv02d/lis3lv02d.c
--- a/drivers/misc/lis3lv02d/lis3lv02d.c~lis3-fix-regression-of-hp-driveguard-with-8bit-chip
+++ a/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -375,12 +375,14 @@ void lis3lv02d_poweron(struct lis3lv02d 
 	 *      both have been read. So the value read will always be correct.
 	 * Set BOOT bit to refresh factory tuning values.
 	 */
-	lis3->read(lis3, CTRL_REG2, &reg);
-	if (lis3->whoami ==  WAI_12B)
-		reg |= CTRL2_BDU | CTRL2_BOOT;
-	else
-		reg |= CTRL2_BOOT_8B;
-	lis3->write(lis3, CTRL_REG2, reg);
+	if (lis3->pdata) {
+		lis3->read(lis3, CTRL_REG2, &reg);
+		if (lis3->whoami ==  WAI_12B)
+			reg |= CTRL2_BDU | CTRL2_BOOT;
+		else
+			reg |= CTRL2_BOOT_8B;
+		lis3->write(lis3, CTRL_REG2, reg);
+	}
 
 	/* LIS3 power on delay is quite long */
 	msleep(lis3->pwron_delay / lis3lv02d_get_odr());
_
Subject: Subject: lis3: fix regression of HP DriveGuard with 8bit chip

Patches currently in -mm which might be from tiwai@suse.de are

origin.patch
lis3-fix-regression-of-hp-driveguard-with-8bit-chip.patch
linux-next.patch
hp_accel-add-a-new-pnp-id.patch
hp_accel-add-axis-mapping-for-hp-probook-elitebook.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-29 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-29 21:01 + lis3-fix-regression-of-hp-driveguard-with-8bit-chip.patch added to -mm tree akpm

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.