Skip to content

Commit

Permalink
ASoC: cs42l42: Remove redundant delays in suspend().
Browse files Browse the repository at this point in the history
This patch will remove redundant delay and minimise
total suspend() function call time.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://msgid.link/r/20240216101157.23176-1-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Vitaly Rodionov authored and Mark Brown committed Feb 19, 2024
1 parent e480c09 commit 3b4ec34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions include/sound/cs42l42.h
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,7 @@
#define CS42L42_PLL_LOCK_TIMEOUT_US 1250
#define CS42L42_HP_ADC_EN_TIME_US 20000
#define CS42L42_PDN_DONE_POLL_US 1000
#define CS42L42_PDN_DONE_TIMEOUT_US 200000
#define CS42L42_PDN_DONE_TIME_MS 100
#define CS42L42_FILT_DISCHARGE_TIME_MS 46
#define CS42L42_PDN_DONE_TIMEOUT_US 235000
#define CS42L42_PDN_DONE_TIME_MS 65

#endif /* __CS42L42_H */
1 change: 0 additions & 1 deletion sound/soc/codecs/cs42l42.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,6 @@ int cs42l42_suspend(struct device *dev)
/* Discharge FILT+ */
regmap_update_bits(cs42l42->regmap, CS42L42_PWR_CTL2,
CS42L42_DISCHARGE_FILT_MASK, CS42L42_DISCHARGE_FILT_MASK);
msleep(CS42L42_FILT_DISCHARGE_TIME_MS);

regcache_cache_only(cs42l42->regmap, true);
gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
Expand Down

0 comments on commit 3b4ec34

Please sign in to comment.