]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
hwmon: lis3: restore axis enabled bits
authorSamu Onkalo <samu.p.onkalo@nokia.com>
Fri, 22 Oct 2010 11:57:28 +0000 (07:57 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 25 Oct 2010 21:11:38 +0000 (14:11 -0700)
All axis enable bits are set to 0 at module remove.
Restore reset default value at init.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/lis3lv02d_i2c.c
drivers/hwmon/lis3lv02d_spi.c

index ec35c87819c0fe801b17c4cb893e9d9c98608b25..c1e7420cf77d49d11c4bbef962697276f9be0adb 100644 (file)
@@ -83,7 +83,7 @@ static int lis3_i2c_init(struct lis3lv02d *lis3)
        if (ret < 0)
                return ret;
 
-       reg |= CTRL1_PD0;
+       reg |= CTRL1_PD0 | CTRL1_Xen | CTRL1_Yen | CTRL1_Zen;
        return lis3->write(lis3, CTRL_REG1, reg);
 }
 
index 955544b1c71e4d9a05e0c95274ca6525500ba7ae..2549de1de4e2baccadca7ed80d8fc642d65ca781 100644 (file)
@@ -50,7 +50,7 @@ static int lis3_spi_init(struct lis3lv02d *lis3)
        if (ret < 0)
                return ret;
 
-       reg |= CTRL1_PD0;
+       reg |= CTRL1_PD0 | CTRL1_Xen | CTRL1_Yen | CTRL1_Zen;
        return lis3->write(lis3, CTRL_REG1, reg);
 }