summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorB R, Harsha <harsha.b.r@intel.com>2022-01-07 03:09:26 +0530
committerCommit Bot <commit-bot@chromium.org>2022-01-10 20:04:56 +0000
commit7ffefe33a254b4a83213fa9aeb5ba4c34704efee (patch)
treebb0e76f08bf980d694d452f53920f121ad72c26b /include
parent229252b3e2e575c100f61dd0333f07f6c42790c3 (diff)
downloadchrome-ec-7ffefe33a254b4a83213fa9aeb5ba4c34704efee.tar.gz
ectool: Update max sensor count with defined macro
Define a new macro EC_MAX_TEMP_SENSOR_ENTRIES in ec_commands.h and replace all hard coded or const used to check for available thermal sensors with the EC_MAX_TEMP_SENSOR_ENTRIES macro BUG=none BRANCH=none TEST=make buildall -j, zmake testall Signed-off-by: B R, Harsha <harsha.b.r@intel.com> Change-Id: Ifbcf4b9dca9be1ad59918d567eeaffa2ac5db81e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3369161 Reviewed-by: Harsha BR <harsha.b.r@intel.corp-partner.google.com> Tested-by: Harsha BR <harsha.b.r@intel.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 41153dae1d..652b491cd2 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -180,7 +180,7 @@ extern "C" {
#define EC_MEMMAP_ACC_STATUS_PRESENCE_BIT BIT(7)
/* Number of temp sensors at EC_MEMMAP_TEMP_SENSOR */
-#define EC_TEMP_SENSOR_ENTRIES 16
+#define EC_TEMP_SENSOR_ENTRIES 16
/*
* Number of temp sensors at EC_MEMMAP_TEMP_SENSOR_B.
*
@@ -188,6 +188,10 @@ extern "C" {
*/
#define EC_TEMP_SENSOR_B_ENTRIES 8
+/* Max temp sensor entries for host commands */
+#define EC_MAX_TEMP_SENSOR_ENTRIES (EC_TEMP_SENSOR_ENTRIES + \
+ EC_TEMP_SENSOR_B_ENTRIES)
+
/* Special values for mapped temperature sensors */
#define EC_TEMP_SENSOR_NOT_PRESENT 0xff
#define EC_TEMP_SENSOR_ERROR 0xfe