ASoC: wsa881x: Avoid query temp during suspend
Runtime suspend in slimbus driver makes QMI call which takes wakelock and result in first system suspend to fail. As a result of first suspend fail, POST_PM_SUSPEND event is dispatched to thermal core which registered to pm notifier. WSA being one of registered thermal zone gets query for temperature, and makes slimbus reads/writes which will result in runtime resume of slimbus driver to happen. System suspend fails again continuously in this endless loop as slimbus runtime suspend will make QMI call again. Update wsa temp sensor to handle suspend event by registering to pm notifier and ignore the temperature request from thermal core at resume. This will avoid slimbus reads/writes during suspend in progress and allow XO shutdown to happen. Change-Id: Id13a9701cffb1231ef7d563cbc30756fd71d5868 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org> Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
29dfffc4b2
commit
c9dd3be3c3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2015, 2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -31,6 +31,10 @@ struct wsa881x_tz_priv {
|
||||
struct wsa_temp_register *wsa_temp_reg;
|
||||
char name[80];
|
||||
wsa_temp_register_read wsa_temp_reg_read;
|
||||
struct notifier_block pm_nb;
|
||||
atomic_t is_suspend_spk;
|
||||
int t0_init;
|
||||
int curr_temp;
|
||||
};
|
||||
|
||||
int wsa881x_get_temp(struct thermal_zone_device *tz_dev, int *temp);
|
||||
|
Reference in New Issue
Block a user