initial commit, reads dev id

Files at this revision

API Documentation at this revision

Comitter:
phonemacro
Date:
Fri Sep 02 22:34:45 2022 +0000
Parent:
6:ec1c447e825c
Commit message:
remove clock enable/disable in MAX8614X::read_fifo_data (that was only needed for Rev A)

Changed in this revision

MAX8614X.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MAX8614X.cpp	Fri Sep 02 22:15:27 2022 +0000
+++ b/MAX8614X.cpp	Fri Sep 02 22:34:45 2022 +0000
@@ -149,28 +149,6 @@
     uint16_t num_bytes = num_samples * MAX8614X_DATA_WORD_SIZE;
     int ret = 0;
 
-    struct RegisterMap test_clk_enable[] = {
-        {0xFF, 0x54},
-        {0xFF, 0x4D},
-        {0x81, 0x20},
-        {0xFF, 0x00}
-    };
-
-    struct RegisterMap test_clk_disable[] = {
-        {0xFF, 0x54},
-        {0xFF, 0x4D},
-        {0x81, 0x00},
-        {0xFF, 0x00}
-    };
-
-    // only need the following for Rev A of MAXM86141/0
-    #ifdef MAX86141_REV_A
-    ret = writeBlock(test_clk_enable, ARRAY_SIZE(test_clk_enable));
-    if (ret < 0) {
-        pr_err("writeBlock failed. ret: %d", ret);
-        return ret;
-    }
-    #endif
     fifo_data[0] = MAX8614X_FIFO_DATA_REG;
     ret = readRegister(MAX8614X_FIFO_DATA_REG, fifo_data, num_bytes);
     if (ret < 0) {
@@ -178,15 +156,6 @@
         return ret;
     }
 
-    // only need the following for Rev A of MAXM86141/0
-    #ifdef MAX86141_REV_A
-    ret = writeBlock(test_clk_disable, ARRAY_SIZE(test_clk_disable));
-    if (ret < 0) {
-        pr_err("writeBlock failed. ret: %d", ret);
-        return ret;
-    }
-    #endif
-
     return ret;
 }