mirror of https://gitee.com/openkylin/linux.git
hwmon: lis3: restore axis enabled bits
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>
This commit is contained in:
parent
2a7fade7e0
commit
ed37d7f619
|
@ -83,7 +83,7 @@ static int lis3_i2c_init(struct lis3lv02d *lis3)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
reg |= CTRL1_PD0;
|
reg |= CTRL1_PD0 | CTRL1_Xen | CTRL1_Yen | CTRL1_Zen;
|
||||||
return lis3->write(lis3, CTRL_REG1, reg);
|
return lis3->write(lis3, CTRL_REG1, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ static int lis3_spi_init(struct lis3lv02d *lis3)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
reg |= CTRL1_PD0;
|
reg |= CTRL1_PD0 | CTRL1_Xen | CTRL1_Yen | CTRL1_Zen;
|
||||||
return lis3->write(lis3, CTRL_REG1, reg);
|
return lis3->write(lis3, CTRL_REG1, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue