summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTai Kuo <taikuo@google.com>2022-10-13 20:17:32 +0800
committerTai Kuo <taikuo@google.com>2022-10-24 08:21:21 +0000
commit4fbab05a66f7e9ed54ef9afac64cdc4a0588a7de (patch)
treeac0aa765f5cd7cda7b427ec6c84744ef05d0c97d
parentc2bb59ef24b9dac77b8ef592fb04530071b79b2f (diff)
downloadamplifiers-4fbab05a66f7e9ed54ef9afac64cdc4a0588a7de.tar.gz
cs40l26: adjust bus retry count from 100 to 3
Bug: 236659376 Test: add test logs to display the count setting Signed-off-by: Tai Kuo <taikuo@google.com> Change-Id: I0cdf84a90e3ddae2b88a756a9198bb3e2ac6a3c0
-rw-r--r--cs40l26/Makefile1
-rw-r--r--cs40l26/cs40l26.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/cs40l26/Makefile b/cs40l26/Makefile
index 5642c07..3c4ceaf 100644
--- a/cs40l26/Makefile
+++ b/cs40l26/Makefile
@@ -21,6 +21,7 @@ KBUILD_OPTIONS += CONFIG_INPUT_CS40L26_I2C=m \
EXTRA_CFLAGS += -DDYNAMIC_DEBUG_MODULE
EXTRA_CFLAGS += -DCONFIG_INPUT_CS40L26_ATTR_UNDER_BUS
+EXTRA_CFLAGS += -DCONFIG_GOOG_CUST
modules modules_install clean:
$(MAKE) -C $(KERNEL_SRC) M=$(M) \
diff --git a/cs40l26/cs40l26.h b/cs40l26/cs40l26.h
index d7be94f..c61e4de 100644
--- a/cs40l26/cs40l26.h
+++ b/cs40l26/cs40l26.h
@@ -780,7 +780,11 @@
/* DSP mailbox controls */
#define CS40L26_DSP_TIMEOUT_US_MIN 1000
#define CS40L26_DSP_TIMEOUT_US_MAX 1100
+#if IS_ENABLED(CONFIG_GOOG_CUST)
+#define CS40L26_DSP_TIMEOUT_COUNT 3
+#else
#define CS40L26_DSP_TIMEOUT_COUNT 100
+#endif
#define CS40L26_DSP_MBOX_RESET 0x0