From a1e6a92e5f9d7187d4d9a0d49ae70d759e9584dc Mon Sep 17 00:00:00 2001
From: Juliano Murari <juliano.murari@ess.eu>
Date: Tue, 13 Sep 2022 11:12:23 +0200
Subject: [PATCH] PBIBCM-225 Fix DIFF Alarm Control issue

---
 vendor/ess/lib/sis8300drvbcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vendor/ess/lib/sis8300drvbcm.c b/vendor/ess/lib/sis8300drvbcm.c
index 0602bea..cad884e 100644
--- a/vendor/ess/lib/sis8300drvbcm.c
+++ b/vendor/ess/lib/sis8300drvbcm.c
@@ -2094,12 +2094,12 @@ static int set_differential_alarms_control(sis8300drv_usr *sisuser, unsigned int
             SIS8300BCM_DIFF_BANK_OFF + \
             SIS8300BCM_DIFF_X_ALARM_CONTROL_OFF;
     unsigned int value;
-    // register has lowest 3 bits defined
+    // register has lowest 4 bits defined
     int ret = sis8300drv_reg_read(sisuser, reg, &value);
     if (ret) {
         return ret;
     }
-    value &= 0x7;
+    value &= 0xF;
     // set / clear the desired bit
     if (disable) {
         value |= (1 << bit);
-- 
GitLab