summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2021-04-30 14:07:35 +0800
committerHans de Goede <hdegoede@redhat.com>2021-05-11 13:44:18 +0200
commit79d341e26ebcdbc622348aaaab6f8f89b6fdb25f (patch)
tree76cb329cdd3b1291107b3b2ecfef69e581cdc4a4 /drivers/misc
parentb09aaa3f2c0edeeed670cd29961a0e35bddc78cf (diff)
downloadlinux-79d341e26ebcdbc622348aaaab6f8f89b6fdb25f.tar.bz2
platform/x86: hp_accel: Avoid invoking _INI to speed up resume
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>
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 c394c0b08519..7ac788fae1b8 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);