ASoC: wcd9320: Use resgmr cond updater to enable headphone PAs

Headphone's PAs shouldn't be enabled until headphone is detected by MBHC.
Use resource manager's conditional updater to write class H PA enable bit
so that driver can avoid PA enablement without headphone.

CRs-fixed: 452494
Change-Id: Ic9fd45c303025f2f73fee427b91a5014bdbafa24
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
diff --git a/sound/soc/codecs/wcd9xxx-common.h b/sound/soc/codecs/wcd9xxx-common.h
index 743ab0c..dc00ec6 100644
--- a/sound/soc/codecs/wcd9xxx-common.h
+++ b/sound/soc/codecs/wcd9xxx-common.h
@@ -14,6 +14,8 @@
 
 #define WCD9XXX_CODEC_COMMON
 
+#include "wcd9xxx-resmgr.h"
+
 #define WCD9XXX_CLSH_REQ_ENABLE true
 #define WCD9XXX_CLSH_REQ_DISABLE false
 
@@ -50,6 +52,7 @@
 struct wcd9xxx_clsh_cdc_data {
 	u8 state;
 	int buck_mv;
+	struct wcd9xxx_resmgr *resmgr;
 };
 
 
@@ -63,6 +66,7 @@
 		struct wcd9xxx_clsh_cdc_data *cdc_clsh_d,
 		u8 req_state, bool req_type, u8 clsh_event);
 
-extern void wcd9xxx_clsh_init(struct wcd9xxx_clsh_cdc_data *clsh);
+extern void wcd9xxx_clsh_init(struct wcd9xxx_clsh_cdc_data *clsh,
+			      struct wcd9xxx_resmgr *resmgr);
 
 #endif