Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aalc: Modify sensor threshold range #2176

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions meta-facebook/aalc-rpu/src/platform/plat_threshold.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "sensor.h"

Check failure on line 17 in meta-facebook/aalc-rpu/src/platform/plat_threshold.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Include file: "sensor.h" not found. Raw Output: meta-facebook/aalc-rpu/src/platform/plat_threshold.c:17:0:Include file: "sensor.h" not found.
#include "plat_sensor_table.h"
#include "plat_isr.h"
#include "plat_gpio.h"
Expand All @@ -22,7 +22,7 @@
#include "plat_hwmon.h"
#include "plat_led.h"
#include "plat_log.h"
#include <logging/log.h>

Check failure on line 25 in meta-facebook/aalc-rpu/src/platform/plat_threshold.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Include file: <logging/log.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. Raw Output: meta-facebook/aalc-rpu/src/platform/plat_threshold.c:25:0:Include file: <logging/log.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "plat_threshold.h"
#include "plat_fsc.h"
#include <hal_i2c.h>
Expand Down Expand Up @@ -722,9 +722,9 @@
THRESHOLD_ARG0_TABLE_INDEX, 1 },
{ SENSOR_NUM_HEX_EXTERNAL_Y_FILTER, THRESHOLD_ENABLE_UCR, 0, 30, sensor_log,
SENSOR_NUM_HEX_EXTERNAL_Y_FILTER, 1 },
{ SENSOR_NUM_BPB_RACK_PRESSURE_3_P_KPA, THRESHOLD_ENABLE_UCR, 0, 200, sensor_log,
{ SENSOR_NUM_BPB_RACK_PRESSURE_3_P_KPA, THRESHOLD_ENABLE_UCR, 0, 300, sensor_log,
SENSOR_NUM_BPB_RACK_PRESSURE_3_P_KPA, 1 },
{ SENSOR_NUM_BPB_RACK_PRESSURE_4_P_KPA, THRESHOLD_ENABLE_UCR, 0, 200, sensor_log,
{ SENSOR_NUM_BPB_RACK_PRESSURE_4_P_KPA, THRESHOLD_ENABLE_UCR, 0, 300, sensor_log,
SENSOR_NUM_BPB_RACK_PRESSURE_4_P_KPA, 1 },
{ SENSOR_NUM_SB_HEX_PRESSURE_1_P_KPA, THRESHOLD_ENABLE_UCR, 0, 200, sensor_log,
SENSOR_NUM_SB_HEX_PRESSURE_1_P_KPA, 1 },
Expand Down Expand Up @@ -963,6 +963,11 @@

uint32_t get_threshold_status(uint8_t sensor_num)
{
// This is for DVT work around, it will be removed after hardware design fixed
if (sensor_num == SENSOR_NUM_BPB_RPU_LEVEL) {
return 0;
}

for (uint8_t i = 0; i < ARRAY_SIZE(threshold_tbl); i++)
if (threshold_tbl[i].sensor_num == sensor_num)
return threshold_tbl[i].last_status;
Expand Down
Loading