summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2023-01-01 18:28:12 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2023-01-01 18:28:13 -0800
commitaab6c87eeece2136aff7354245140ec4d93a49eb (patch)
tree4494323fff5c9f8cab45643d7bae66229824b95b
parentc9a57fda2e9c1086e48968db7661539103e8d34e (diff)
parent9f374a98c692a587a7a9919d8a11258054864a91 (diff)
downloadamplifiers-aab6c87eeece2136aff7354245140ec4d93a49eb.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udcandroid-u-preview-1_r0.3android-gs-bluejay-5.10-u-preview-1
SBMerger: 478053055 Change-Id: I7557b9f0d7949f2c2d94fa9de5ab3435621f291f Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--cs40l26/cs40l26-sysfs.c10
-rw-r--r--cs40l26/cs40l26.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/cs40l26/cs40l26-sysfs.c b/cs40l26/cs40l26-sysfs.c
index 1f125db..6737894 100644
--- a/cs40l26/cs40l26-sysfs.c
+++ b/cs40l26/cs40l26-sysfs.c
@@ -168,9 +168,19 @@ static ssize_t vibe_state_show(struct device *dev,
return -EPERM;
}
+#if IS_ENABLED(CONFIG_GOOG_CUST)
+ /*
+ * Since HAL will only read this attribute after sysfs_nofity is called,
+ * removing the mutex_lock to mitigate the chances that HAL only get the
+ * stopped state in triggering the back-to-back short haptic effect
+ * (e.g. TICK effct).
+ */
+ state = cs40l26->vibe_state;
+#else
mutex_lock(&cs40l26->lock);
state = cs40l26->vibe_state;
mutex_unlock(&cs40l26->lock);
+#endif
return snprintf(buf, PAGE_SIZE, "%u\n", state);
}
diff --git a/cs40l26/cs40l26.c b/cs40l26/cs40l26.c
index d4d4b3f..122842f 100644
--- a/cs40l26/cs40l26.c
+++ b/cs40l26/cs40l26.c
@@ -3258,8 +3258,14 @@ static int cs40l26_gpio_config(struct cs40l26_private *cs40l26)
CS40L26_IRQ1_GPIO1_RISE));
if (mask_gpio)
+#if IS_ENABLED(CONFIG_GOOG_CUST)
+ /* Extend the GPIO trigger mask to ignore GPIO1 falling edge */
+ val = (u32) GENMASK(CS40L26_IRQ1_GPIO4_FALL,
+ CS40L26_IRQ1_GPIO1_FALL);
+#else
val = (u32) GENMASK(CS40L26_IRQ1_GPIO4_FALL,
CS40L26_IRQ1_GPIO2_RISE);
+#endif
else
val = 0;