summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2021-04-30 14:07:35 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-03 08:59:08 +0200
commite0c7f6cce1cf4d4f8821c067b54e284126826c47 (patch)
treebb2a331dd94f8803721943d3fd259637c71d82ab /drivers/misc
parentbd7a3b3ed9e35ba1057fd9f3a308cc56576d47a5 (diff)
downloadlinux-e0c7f6cce1cf4d4f8821c067b54e284126826c47.tar.gz
linux-e0c7f6cce1cf4d4f8821c067b54e284126826c47.tar.bz2
linux-e0c7f6cce1cf4d4f8821c067b54e284126826c47.zip
platform/x86: hp_accel: Avoid invoking _INI to speed up resume
[ Upstream commit 79d341e26ebcdbc622348aaaab6f8f89b6fdb25f ] hp_accel can take almost two seconds to resume on some HP laptops. The bottleneck is on evaluating _INI, which is only needed to run once. Resolve the issue by only invoking _INI when it's necessary. Namely, on probe and on hibernation restore. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Acked-by: Éric Piel <eric.piel@trempplin-utc.net> Link: https://lore.kernel.org/r/20210430060736.590321-1-kai.heng.feng@canonical.com Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.h b/drivers/misc/lis3lv02d/lis3lv02d.h
index 1b0c99883c57..c008eecfdfe8 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.h
+++ b/drivers/misc/lis3lv02d/lis3lv02d.h
@@ -271,6 +271,7 @@ struct lis3lv02d {
int regs_size;
u8 *reg_cache;
bool regs_stored;
+ bool init_required;
u8 odr_mask; /* ODR bit mask */
u8 whoami; /* indicates measurement precision */
s16 (*read_data) (struct lis3lv02d *lis3, int reg);