OpenBIC
OpenSource Bridge-IC
sensor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef SENSOR_H
18#define SENSOR_H
19
20#include <stdbool.h>
21#include <stdint.h>
22#include <kernel.h>
23
24#include "plat_def.h"
25#include "sdr.h"
26#include "pldm_monitor.h"
27#include "libutil.h"
28#include "sensor_shell.h"
29
30#define sensor_name_to_num(x) #x,
31
32#define SENSOR_POLL_STACK_SIZE 2048
33#define NONE 0
34
35#define GET_FROM_CACHE 0x00
36#define GET_FROM_SENSOR 0x01
37
38#define SENSOR_NULL 0xFF
39#define SENSOR_FAIL 0xFF
40#define SENSOR_NUM_MAX 0xFF
41#define SENSOR_NOT_SUPPORT 0xFF
42#define DIMM_NOT_PRESENT 0xFF
43
44#define DEBUG_SENSOR 0
45
46#define SAMPLE_COUNT_DEFAULT 1
47
48#define POLL_TIME_DEFAULT 1
49
59};
60
65};
66
79};
80
90};
91
102};
103
107};
108
110 ADS112C_MUX_1_CON = 0x80, //AINP = AIN0, AINN = AVSS
111 ADS112C_MUX_2_CON = 0x90, //AINP = AIN1, AINN = AVSS
112 ADS112C_MUX_3_CON = 0xA0, //AINP = AIN2, AINN = AVSS
113 ADS112C_MUX_4_CON = 0xA1, //AINP = AIN3, AINN = AVSS
114};
115
116// The sequence needs to same with table sensor_drive_tbl
194
198};
199
200typedef struct _sensor_val {
201 int16_t integer;
202 int16_t fraction;
204
205struct tca9548 {
206 uint8_t addr;
207 uint8_t chan;
208};
209
210static inline int calculate_accurate_MBR(uint8_t sensor_num, int val)
211{ // for better accuracy, enlarge SDR to two byte scale
212 if (SDR_M(sensor_num) == 0) {
213 return ((val << 8) * SDR_Rexp(sensor_num));
214 }
215 return ((val << 8) / SDR_M(sensor_num) * SDR_Rexp(sensor_num));
216}
217
218static inline int calculate_MBR(uint8_t sensor_num, int val)
219{
220 if (SDR_M(sensor_num) == 0) {
221 return (val * SDR_Rexp(sensor_num) + round_add(sensor_num, val));
222 }
223 return (val * SDR_Rexp(sensor_num) / SDR_M(sensor_num) + round_add(sensor_num, val));
224}
225
226static inline float convert_MBR_to_reading(uint8_t sensor_num, uint8_t val)
227{
228 if (SDR_M(sensor_num) == 0) {
229 return (val - round_add(sensor_num, val)) / SDR_Rexp(sensor_num);
230 }
231
232 return (val - round_add(sensor_num, val)) * SDR_M(sensor_num) / SDR_Rexp(sensor_num);
233}
234
235enum {
239 SENSOR_NOT_ACCESSIBLE, // Only use to check sensor access fail
252};
253
255
256typedef struct _sensor_cfg_ {
257 uint8_t num;
258 uint8_t type;
259 uint8_t port; // port, bus, channel, etc.
260 uint8_t target_addr;
261 uint16_t offset;
262 bool (*access_checker)(uint8_t);
263 int arg0;
264 int arg1;
266 int64_t poll_time; // sec
268 int cache;
270 bool (*pre_sensor_read_hook)(struct _sensor_cfg_ *, void *);
272 bool (*post_sensor_read_hook)(struct _sensor_cfg_ *, void *, int *);
275
276 /* if there is new parameter should be added, please add on above */
278 uint8_t retry;
279 uint8_t (*init)(uint8_t, int *);
280 uint8_t (*read)(struct _sensor_cfg_ *, int *);
282
285 uint8_t cfg_count;
286 bool (*access_checker)(uint8_t);
288 bool (*pre_monitor)(uint8_t, void *);
289 bool (*post_monitor)(uint8_t, void *);
294
295typedef struct _sensor_drive_api {
297 uint8_t (*init)(struct _sensor_cfg_ *);
299
300typedef struct _sensor_poll_time_cfg {
301 uint8_t sensor_num;
304
305typedef struct _vr_page_cfg {
306 uint8_t vr_page;
308
309/* INIT arg */
310typedef struct _isl28022_init_arg {
311 /* value to set configuration register */
312 union {
313 uint16_t value;
314 struct {
315 uint16_t MODE : 3;
316 uint16_t SADC : 4;
317 uint16_t BADC : 4;
318 uint16_t PG : 2;
319 uint16_t BRNG : 2;
320 uint16_t RST : 1;
323
326 /* The threshold of Volts */
330
333 union {
334 uint16_t value;
335 struct {
336 /* External Clock Divider bits*/
337 uint16_t ExtCLKDiv : 6;
338 /* External Clock Enable bit */
339 uint16_t ExtClkEn : 1;
340 /* Interrupt Enable bit*/
341 uint16_t INTREN : 1;
342 /* Force Interrupt bit */
343 uint16_t FORCEINTR : 1;
344 uint16_t resv : 7;
348
349 /* R_shunt valus, unit: milliohm */
350 uint32_t r_shunt;
351 /* used when read current/power */
353 /* Initialize function will set following arguments, no need to give value */
355
357
358typedef struct _adc_asd_deglitch_arg {
359 uint16_t upper_bound;
360 uint16_t lower_bound;
363
364typedef struct _adc_asd_init_arg {
368
369typedef struct _adm1278_init_arg {
370 /* value to set configuration register */
371 union {
372 uint16_t value;
373 struct {
374 uint16_t RSV1 : 1;
375 uint16_t VOUT_EN : 1;
376 uint16_t VIN_EN : 1;
377 uint16_t TEMP1_EN : 1;
378 uint16_t PMON_MODE : 1;
379 uint16_t RSV2 : 3;
380 uint16_t VI_AVG : 3;
381 uint16_t PWR_AVG : 3;
382 uint16_t SIMULTANEOUS : 1;
383 uint16_t TSFILT : 1;
386 /* Rsense valus, unit: milliohm */
387 float r_sense;
388
389 /* Initialize function will set following arguments, no need to give value */
391
393
394typedef struct _pex89000_init_arg {
395 uint8_t idx;
396 struct k_mutex brcm_pciesw;
397
398 /* Initialize function will set following arguments, no need to give value */
400
402
403typedef struct _ltc4282_init_arg {
404 /* value to get/set ILIM ADJUST register */
405 union {
406 uint8_t value;
407 struct {
408 uint8_t _16_bit : 1;
409 uint8_t gpio_mode : 1;
410 uint8_t vsource_vdd : 1;
411 uint8_t foldback_mode : 2;
412 uint8_t ilim_adjust : 3;
415
416 /* Rsense valus, unit: milliohm */
418
419 /* Initialize function will set following arguments, no need to give value */
421
422 /* Initialized chip registers if it's needed
423 * bit 0 - ilim adjust register setting
424 * bit 1 to 7 are reserved
425 */
428
429typedef struct _ltc4286_init_arg {
430 /* value to get/set MFR CONFIG 1 register */
431 union {
432 uint16_t value;
433 struct {
434 uint16_t vpwr_select : 1;
435 uint16_t vrange_select : 1;
436 uint16_t reserved_1 : 8; // bit[9:2] are reserved.
437 uint16_t ilim : 4;
438 uint16_t reserved_2 : 2; // bit[15:14] are reserved.
441 /* Rsense valus, unit: milliohm */
443 /* Initailize function will set following arguments, no need to give value */
446
447typedef struct _mp5990_init_arg {
448 /* value to sets the gain for output current reporting */
450 /* value to sets the IMON based total over current fault limit */
452 /* value to sets the SCREF and OCWREF voltage level. */
453 uint16_t ocw_sc_ref;
454
455 /* Initialize function will set following arguments, no need to give value */
457
459
460typedef struct _rs31380r_init_arg {
461 /* value to sets the gain for output current reporting */
463 /* value to sets the IMON based total over current fault limit */
465 /* value to sets the SCREF and OCWREF voltage level. */
466 uint16_t ocw_sc_ref;
467
468 /* Initialize function will set following arguments, no need to give value */
470
472
473typedef struct _pmic_init_arg {
476 uint8_t smbus_addr;
478
479typedef struct _rtq6056_init_arg_ {
482 float r_shunt;
484
485typedef struct _vistara_init_arg_ {
488
489typedef struct _ina233_init_arg_ {
492 float r_shunt;
494 /* value to get/set MFR CONFIG register */
495 union {
496 uint16_t value;
497 struct {
498 uint16_t operating_mode : 3;
499 uint16_t shunt_volt_time : 3;
500 uint16_t bus_volt_time : 3;
501 uint16_t aver_mode : 3;
502 uint16_t rsvd : 4; // bit[15:12] are reserved.
503 };
506 union {
507 uint8_t value;
508 struct {
509 uint8_t apol : 1;
510 uint8_t alert_behavior : 1;
511 uint8_t ein_autoclear : 1;
512 uint8_t i2c_filt : 1;
513 uint8_t ein_accum : 2;
514 uint8_t rsvd : 1;
515 uint8_t ein_status : 1;
516 };
524
525typedef struct _max16550a_init_arg_ {
526 float r_load;
528
529typedef struct _ina230_init_arg {
530 /* value to set configuration register */
531 union {
532 uint16_t value;
533 struct {
534 uint16_t MODE : 3;
535 uint16_t VSH_CT : 3;
536 uint16_t VBUS_CT : 3;
537 uint16_t AVG : 3;
538 uint16_t reserved : 3;
539 uint16_t RST : 1;
540 };
542
543 /* Shunt resistor value. Unit: Ohm. */
544 double r_shunt;
545
546 /* Alert value.
547 * The unit is Volt or Watt, depending on the alert function.
548 */
550
551 /* value to set alert register */
552 union {
553 uint16_t value;
554 struct {
555 uint16_t LEN : 1;
556 uint16_t APOL : 1;
557 uint16_t OVF : 1;
558 uint16_t CVRF : 1;
559 uint16_t AFF : 1;
560 uint16_t reserved : 5;
561 uint16_t CNVR : 1;
562 uint16_t POL : 1; // Lowest priority
563 uint16_t BUL : 1;
564 uint16_t BOL : 1;
565 uint16_t SUL : 1;
566 uint16_t SOL : 1; // Highest priority
567 };
569
570 /* Expected maximum current */
571 double i_max;
572
573 /* The current/power value per 1 bit.
574 * The unit is Amp or Watt, depending on the respective register.
575 */
576 double cur_lsb;
577 double pwr_lsb;
578
579 /* Initialize function will set following arguments, no need to give value */
581
583
585 uint32_t data;
586 uint8_t retry;
588
589typedef struct _pm8702_dimm_init_arg {
591 uint8_t dimm_id;
593
594typedef struct _ddr5_init_power_arg_ {
595 uint8_t HID_code;
596 uint8_t port_number;
598
599typedef struct _ddr5_init_temp_arg_ {
600 uint8_t HID_code;
601 uint8_t port_number;
602 float ts0_temp;
603 float ts1_temp;
605
606typedef struct _adm1272_init_arg {
607 union {
608 uint16_t value;
609 struct {
610 uint16_t IRANGE : 1;
611 uint16_t VOUT_EN : 1;
612 uint16_t VIN_EN : 1;
613 uint16_t TEMP1_EN : 1;
614 uint16_t PMON_MODE : 1;
615 uint16_t VRANGE : 1;
616 uint16_t RSV2 : 2;
617 uint16_t VI_AVG : 3;
618 uint16_t PWR_AVG : 3;
619 uint16_t SIMULTANEOUS : 1;
620 uint16_t TSFILT : 1;
623
624 /* Initialize function will set following arguments, no need to give value */
628
629#ifdef MORE_THAN_ONE_ADM1272
630 bool is_record_ein;
631 uint32_t last_energy;
632 uint32_t last_rollover;
633 uint32_t last_sample;
634#endif
636
637typedef struct _sq52205_init_arg_ {
640 float r_shunt;
641 union {
642 uint16_t value;
643 struct {
644 uint16_t operating_mode : 3;
645 uint16_t shunt_volt_time : 3;
646 uint16_t bus_volt_time : 3;
647 uint16_t aver_mode : 3;
648 uint16_t rsvd : 3; // bit[14:12] are reserved.
649 uint16_t reset_bit : 1;
650 };
652
654 union {
655 uint16_t value;
656 struct {
657 uint8_t clear_ein : 1;
658 uint8_t switch_ein_mode : 1;
659 uint8_t rsvd : 5;
660 uint8_t timer : 3;
661 uint8_t ein_auto_clear : 1;
662 uint8_t switch_adc_mode : 1;
663 uint8_t ein_accum : 2;
664 uint8_t accum_mode : 1;
665 uint8_t ein_status : 1;
666 };
668
670 union {
671 // Only use 5-bit for setting alert bit
672 uint8_t value;
673 struct {
674 uint8_t power_over_bit : 1;
675 uint8_t bus_voltage_uv : 1;
676 uint8_t bus_voltage_ov : 1;
677 uint8_t shunt_voltage_uv : 1;
678 uint8_t shunt_voltage_ov : 1;
679 uint8_t resv : 3;
680 };
684
685typedef struct _ltc2991_init_arg_ {
687 union {
688 int value;
689 struct {
691 uint8_t V1_V2_TEMPERATURE : 1;
692 uint8_t T1_KELVIN : 1;
693 uint8_t V1_V2_FILT : 1;
695 uint8_t V3_V4_TEMPERATURE : 1;
696 uint8_t T2_KELVIN : 1;
697 uint8_t V3_V4_FILT : 1;
700 union {
701 int value;
702 struct {
704 uint8_t V5_V6_TEMPERATURE : 1;
705 uint8_t T3_KELVIN : 1;
706 uint8_t V5_V6_FILT : 1;
708 uint8_t V7_V8_TEMPERATURE : 1;
709 uint8_t T4_KELVIN : 1;
710 uint8_t V7_V8_FILT : 1;
714
715typedef struct _nct7718w_init_arg_ {
719 uint8_t alert_mask;
724
725typedef struct _g788p81u_init_arg_ {
728 uint8_t alert_mode;
729 uint8_t alert_mask;
734
735typedef struct _pt5161l_init_arg_ {
736 uint8_t temp_cal_code_pma_a[4]; // temp calibration codes for PMA A
737 uint8_t temp_cal_code_pma_b[4]; // temp calibration codes for PMA B
738 uint8_t temp_cal_code_avg; // average temp calibration code
741
742typedef struct _mp2985_init_arg {
745
746typedef struct _cx7_init_arg {
748 uint8_t endpoint;
749 uint16_t sensor_id;
751
752typedef struct _max11617_init_arg {
754 uint8_t mode;
755 uint8_t setup_byte;
756 uint8_t config_byte;
757 float scalefactor[12];
759
760typedef struct _nv_satmc_init_arg {
762 uint8_t endpoint;
763 uint16_t sensor_id;
764 uint8_t state_sensor_idx; //only used for state sensor
765 pldm_sensor_pdr_parm parm; //only used for numeric sensor
767
768typedef struct _adc128d818_init_arg {
771 float vref;
772 float scalefactor[8];
774
775typedef struct mp2971_init_args {
778
779typedef struct isl69259_init_args {
783
795};
796
797extern bool enable_sensor_poll_thread;
799// Mapping sensor number to sensor config index
801extern uint8_t sensor_config_count;
803extern uint16_t sensor_monitor_count;
804extern const char *const sensor_type_name[];
806
808uint8_t get_sensor_reading(sensor_cfg *cfg_table, uint8_t cfg_count, uint8_t sensor_num,
809 int *reading, uint8_t read_mode);
810void pal_set_sensor_poll_interval(int *interval_ms);
811bool stby_access(uint8_t sensor_num);
812bool dc_access(uint8_t sensor_num);
813bool e1s_pwrgd_access(uint8_t sensor_num);
814bool post_access(uint8_t sensor_num);
815bool me_access(uint8_t sensor_num);
816bool vr_access(uint8_t sensor_num);
817bool vr_stby_access(uint8_t sensor_num);
818bool sensor_init(void);
820void enable_sensor_poll();
822void pal_extend_sensor_config(void);
824void add_sensor_config(sensor_cfg config);
826bool pal_is_time_to_poll(uint8_t sensor_num, int poll_time);
827uint8_t plat_get_config_size();
828void load_sensor_config(void);
829void control_sensor_polling(uint8_t sensor_num, uint8_t optional, uint8_t cache_status);
834sensor_cfg *find_sensor_cfg_via_sensor_num(sensor_cfg *cfg_table, uint8_t cfg_count,
835 uint8_t sensor_num);
838uint8_t common_tbl_sen_reinit(uint8_t sen_num);
840
841#endif
uint32_t val
Definition: plat_util.c:40
uint8_t reading[1]
Definition: pldm_monitor.h:3
#define SDR_M(sensor_num)
Definition: sdr.h:457
#define SDR_Rexp(sensor_num)
Definition: sdr.h:461
struct _sensor_val sensor_val
uint8_t sensor_config_count
Definition: sensor.c:66
struct _ddr5_init_temp_arg_ ddr5_init_temp_arg
sensor_monitor_table_info * sensor_monitor_table
Definition: sensor.c:68
sensor_cfg * get_common_sensor_cfg_info(uint8_t sensor_num)
Definition: sensor.c:771
struct _ltc2991_init_arg_ ltc2991_init_arg
bool check_reading_pointer_null_is_allowed(sensor_cfg *cfg)
Definition: sensor.c:1438
struct _adm1278_init_arg adm1278_init_arg
struct _sensor_cfg_ sensor_cfg
struct _ina230_init_arg ina230_init_arg
struct _apml_mailbox_init_arg_ apml_mailbox_init_arg
struct _rs31380r_init_arg rs31380r_init_arg
bool check_sensor_num_exist(uint8_t sensor_num)
void pal_extend_sensor_config(void)
Definition: sensor.c:1074
struct _max16550a_init_arg_ max16550a_init_arg
TEMP_THRESHOLD_TYPE_E
Definition: sensor.h:784
@ REMOTE_1_LOW_LIMIT
Definition: sensor.h:788
@ TEMP_THRESHOLD_TYPE_E_MAX
Definition: sensor.h:794
@ REMOTE_2_HIGH_LIMIT
Definition: sensor.h:789
@ LOCAL_THERM_LIMIT
Definition: sensor.h:791
@ REMOTE_1_THERM_LIMIT
Definition: sensor.h:792
@ REMOTE_2_LOW_LIMIT
Definition: sensor.h:790
@ LOCAL_LOW_LIMIT
Definition: sensor.h:786
@ REMOTE_2_THERM_LIMIT
Definition: sensor.h:793
@ LOCAL_HIGH_LIMIT
Definition: sensor.h:785
@ REMOTE_1_HIGH_LIMIT
Definition: sensor.h:787
G788P81U_OFFSET
Definition: sensor.h:92
@ G788P81U_ALERT_MODE_OFFSET
Definition: sensor.h:101
@ G788P81U_REMOTE_TEMP_THERM_LIMIT_OFFSET
Definition: sensor.h:99
@ G788P81U_LOCAL_TEMP_THERM_LIMIT_OFFSET
Definition: sensor.h:100
@ G788P81U_REMOTE_THIGH_LIMIT_OFFSET
Definition: sensor.h:96
@ G788P81U_REMOTE_TEMP_OFFSET
Definition: sensor.h:94
@ G788P81U_REMOTE_TEMP_EXT_OFFSET
Definition: sensor.h:97
@ G788P81U_CONFIGURATION_OFFSET
Definition: sensor.h:95
@ G788P81U_ALERT_MASK_OFFSET
Definition: sensor.h:98
@ G788P81U_LOCAL_TEMP_OFFSET
Definition: sensor.h:93
struct _adc128d818_init_arg adc128d818_init_arg
void disable_sensor_poll()
Definition: sensor.c:952
ADM1278_OFFSET
Definition: sensor.h:61
@ ADM1278_PEAK_IOUT_OFFSET
Definition: sensor.h:62
@ ADM1278_PEAK_PIN_OFFSET
Definition: sensor.h:63
@ ADM1278_EIN_EXT_OFFSET
Definition: sensor.h:64
@ SENSOR_INIT_SUCCESS
Definition: sensor.h:254
@ SENSOR_INIT_UNSPECIFIED_ERROR
Definition: sensor.h:254
uint8_t sensor_config_index_map[SENSOR_NUM_MAX]
Definition: sensor.c:53
struct _ltc4286_init_arg ltc4286_init_arg
struct _sensor_poll_time_cfg sensor_poll_time_cfg
NCT7718W_OFFSET
Definition: sensor.h:67
@ NCT7718W_CONFIGURATION_OFFSET
Definition: sensor.h:70
@ NCT7718W_RT1_CRITICAL_TEMP_OFFSET
Definition: sensor.h:74
@ NCT7718W_LOCAL_TEMP_OFFSET
Definition: sensor.h:68
@ NCT7718W_ALERT_MASK_OFFSET
Definition: sensor.h:73
@ NCT7718W_RT_FILTER_ALERT_MODE_OFFSET
Definition: sensor.h:76
@ NCT7718W_CHIP_ID_OFFSET
Definition: sensor.h:77
@ NCT7718W_RT1_HIGH_ALERT_TEMP_OFFSET
Definition: sensor.h:71
@ NCT7718W_REMOTE_TEMP_LSB_OFFSET
Definition: sensor.h:72
@ NCT7718W_REMOTE_TEMP_MSB_OFFSET
Definition: sensor.h:69
@ NCT7718W_LT_CRITICAL_TEMP_OFFSET
Definition: sensor.h:75
@ NCT7718W_VENDOR_ID_OFFSET
Definition: sensor.h:78
struct _pt5161l_init_arg_ pt5161l_init_arg
ADS112C_OFFSET
Definition: sensor.h:109
@ ADS112C_MUX_3_CON
Definition: sensor.h:112
@ ADS112C_MUX_2_CON
Definition: sensor.h:111
@ ADS112C_MUX_1_CON
Definition: sensor.h:110
@ ADS112C_MUX_4_CON
Definition: sensor.h:113
struct _adc_asd_deglitch_arg adc_asd_deglitch_arg
struct _pm8702_dimm_init_arg pm8702_dimm_init_arg
bool vr_access(uint8_t sensor_num)
Definition: sensor.c:1148
void control_sensor_polling(uint8_t sensor_num, uint8_t optional, uint8_t cache_status)
Definition: sensor.c:1421
const char *const sensor_type_name[]
Definition: sensor.c:73
void plat_sensor_poll_post()
Definition: sensor.c:967
CONTROL_SENSOR_POLLING_OPTION
Definition: sensor.h:195
@ ENABLE_SENSOR_POLLING
Definition: sensor.h:197
@ DISABLE_SENSOR_POLLING
Definition: sensor.h:196
struct _sensor_drive_api sensor_drive_api
bool e1s_pwrgd_access(uint8_t sensor_num)
Definition: sensor.c:1129
void clear_unaccessible_sensor_cache(sensor_cfg *cfg)
Definition: sensor.c:810
struct isl69259_init_args isl69259_init_arg
bool init_drive_type_delayed(sensor_cfg *cfg)
Definition: sensor.c:1453
struct _mp2985_init_arg mp2985_init_arg
sensor_drive_api sensor_drive_tbl[]
Definition: sensor.c:368
@ SENSOR_PRE_READ_ERROR
Definition: sensor.h:244
@ SENSOR_READ_API_UNREGISTER
Definition: sensor.h:246
@ SENSOR_NOT_ACCESSIBLE
Definition: sensor.h:239
@ SENSOR_UNAVAILABLE
Definition: sensor.h:251
@ SENSOR_FAIL_TO_ACCESS
Definition: sensor.h:240
@ SENSOR_READ_4BYTE_ACUR_SUCCESS
Definition: sensor.h:247
@ SENSOR_NOT_FOUND
Definition: sensor.h:238
@ SENSOR_PARAMETER_NOT_VALID
Definition: sensor.h:250
@ SENSOR_UNSPECIFIED_ERROR
Definition: sensor.h:242
@ SENSOR_INIT_STATUS
Definition: sensor.h:241
@ SENSOR_READ_SUCCESS
Definition: sensor.h:236
@ SENSOR_POLLING_DISABLE
Definition: sensor.h:243
@ SENSOR_POST_READ_ERROR
Definition: sensor.h:245
@ SENSOR_READ_ACUR_SUCCESS
Definition: sensor.h:237
@ SENSOR_PEC_ERROR
Definition: sensor.h:249
@ SENSOR_NOT_PRESENT
Definition: sensor.h:248
bool get_sensor_init_done_flag()
Definition: sensor.c:1475
struct _vr_page_cfg vr_page_cfg
struct _g788p81u_init_arg_ g788p81u_init_arg
struct _rtq6056_init_arg_ rtq6056_init_arg
void plat_fill_monitor_sensor_table()
Definition: sensor.c:1094
uint16_t sensor_monitor_count
Definition: sensor.c:69
struct mp2971_init_args mp2971_init_arg
void enable_sensor_poll()
Definition: sensor.c:957
struct _pmic_init_arg pmic_init_arg
struct _isl28022_init_arg isl28022_init_arg
sensor_cfg * sensor_config
Definition: sensor.c:65
void add_sensor_config(sensor_cfg config)
Definition: sensor.c:1181
struct _sensor_monitor_table_info sensor_monitor_table_info
bool sensor_init(void)
Definition: sensor.c:1351
DIMM_RELATED_OFFSET
Definition: sensor.h:104
@ DIMM_PMIC_SWA_PWR
Definition: sensor.h:105
@ DIMM_SPD_TEMP
Definition: sensor.h:106
struct _mp5990_init_arg mp5990_init_arg
struct _adc_asd_init_arg adc_asd_init_arg
bool me_access(uint8_t sensor_num)
Definition: sensor.c:1139
bool check_is_sensor_ready()
Definition: sensor.c:1403
SENSOR_DEV
Definition: sensor.h:117
@ sensor_dev_isl69259
Definition: sensor.h:121
@ sensor_dev_mp2985
Definition: sensor.h:160
@ sensor_dev_raa229621
Definition: sensor.h:139
@ sensor_dev_vistara
Definition: sensor.h:165
@ sensor_dev_mp2856gut
Definition: sensor.h:146
@ sensor_dev_ina238
Definition: sensor.h:171
@ sensor_dev_ast_adc
Definition: sensor.h:119
@ sensor_dev_m88rt51632
Definition: sensor.h:161
@ sensor_dev_intel_peci
Definition: sensor.h:120
@ sensor_dev_ads1015
Definition: sensor.h:178
@ sensor_dev_pex89000
Definition: sensor.h:127
@ sensor_dev_amd_tsi
Definition: sensor.h:142
@ sensor_dev_xdpe15284
Definition: sensor.h:129
@ sensor_dev_isl69254iraz_t
Definition: sensor.h:135
@ sensor_dev_xdpe12284c
Definition: sensor.h:138
@ sensor_dev_nct7363
Definition: sensor.h:168
@ sensor_dev_ddr5_temp
Definition: sensor.h:148
@ sensor_dev_ltc4286
Definition: sensor.h:141
@ sensor_dev_hdc1080
Definition: sensor.h:170
@ sensor_dev_nct214
Definition: sensor.h:172
@ sensor_dev_plat_def_sensor
Definition: sensor.h:179
@ sensor_dev_nct7718w
Definition: sensor.h:140
@ sensor_dev_mp5990
Definition: sensor.h:125
@ sensor_dev_ina233
Definition: sensor.h:134
@ sensor_dev_max16550a
Definition: sensor.h:136
@ sensor_dev_ddr5_power
Definition: sensor.h:147
@ sensor_dev_nv_satmc
Definition: sensor.h:167
@ sensor_dev_mp29816a
Definition: sensor.h:187
@ sensor_dev_mp2891
Definition: sensor.h:183
@ sensor_dev_xdp710
Definition: sensor.h:174
@ sensor_dev_apml_mailbox
Definition: sensor.h:143
@ sensor_dev_adm1278
Definition: sensor.h:122
@ sensor_dev_ast_fan
Definition: sensor.h:131
@ sensor_dev_max
Definition: sensor.h:192
@ sensor_dev_bmr313
Definition: sensor.h:182
@ sensor_dev_rtq6056
Definition: sensor.h:186
@ sensor_dev_tmp75
Definition: sensor.h:118
@ sensor_dev_xdpe19283b
Definition: sensor.h:144
@ sensor_dev_pmic
Definition: sensor.h:133
@ sensor_dev_tps53689
Definition: sensor.h:128
@ sensor_dev_pch
Definition: sensor.h:124
@ sensor_dev_max11617
Definition: sensor.h:166
@ sensor_dev_sq52205
Definition: sensor.h:154
@ sensor_dev_cx7
Definition: sensor.h:164
@ sensor_dev_tmp461
Definition: sensor.h:159
@ sensor_dev_raa228238
Definition: sensor.h:184
@ sensor_dev_bmr4922302_803
Definition: sensor.h:189
@ sensor_dev_ads112c
Definition: sensor.h:169
@ sensor_dev_ast_tach
Definition: sensor.h:173
@ sensor_dev_bcm85658
Definition: sensor.h:191
@ sensor_dev_raa228249
Definition: sensor.h:188
@ sensor_dev_emc1412
Definition: sensor.h:155
@ sensor_dev_rs31380r
Definition: sensor.h:176
@ sensor_dev_i3c_dimm
Definition: sensor.h:156
@ sensor_dev_ltc2991
Definition: sensor.h:153
@ sensor_dev_adc128d818
Definition: sensor.h:177
@ sensor_dev_adm1272
Definition: sensor.h:149
@ sensor_dev_u50su4p180pmdafc
Definition: sensor.h:181
@ sensor_dev_e50sn12051
Definition: sensor.h:180
@ sensor_dev_ina230
Definition: sensor.h:137
@ sensor_dev_ds160pt801
Definition: sensor.h:175
@ sensor_dev_mpro
Definition: sensor.h:162
@ sensor_dev_tmp431
Definition: sensor.h:132
@ sensor_dev_mp2971
Definition: sensor.h:151
@ sensor_dev_emc1413
Definition: sensor.h:190
@ sensor_dev_ltc4282
Definition: sensor.h:130
@ sensor_dev_pm8702
Definition: sensor.h:152
@ sensor_dev_lm75bd118
Definition: sensor.h:158
@ sensor_dev_nvme
Definition: sensor.h:123
@ sensor_dev_mpc12109
Definition: sensor.h:185
@ sensor_dev_q50sn120a1
Definition: sensor.h:150
@ sensor_dev_isl28022
Definition: sensor.h:126
@ sensor_dev_g788p81u
Definition: sensor.h:145
@ sensor_dev_bmr351
Definition: sensor.h:163
@ sensor_dev_pt5161l
Definition: sensor.h:157
#define SENSOR_NUM_MAX
Definition: sensor.h:40
void load_sensor_config(void)
Definition: sensor.c:1413
bool enable_sensor_poll_thread
Definition: sensor.c:56
bool get_sensor_poll_enable_flag()
Definition: sensor.c:962
uint8_t pal_get_monitor_sensor_count()
Definition: sensor.c:1089
bool pal_is_time_to_poll(uint8_t sensor_num, int poll_time)
Definition: sensor.c:1063
uint8_t get_sensor_reading(sensor_cfg *cfg_table, uint8_t cfg_count, uint8_t sensor_num, int *reading, uint8_t read_mode)
Definition: sensor.c:820
bool stby_access(uint8_t sensor_num)
Definition: sensor.c:1119
struct _max11617_init_arg max11617_init_arg
bool post_access(uint8_t sensor_num)
Definition: sensor.c:1134
struct _adm1272_init_arg adm1272_init_arg
uint8_t common_tbl_sen_reinit(uint8_t sen_num)
Definition: sensor.c:1258
struct _ina233_init_arg_ ina233_init_arg
bool vr_stby_access(uint8_t sensor_num)
Definition: sensor.c:1156
void pal_set_sensor_poll_interval(int *interval_ms)
Definition: sensor.c:1068
struct _cx7_init_arg cx7_init_arg
sensor_cfg * find_sensor_cfg_via_sensor_num(sensor_cfg *cfg_table, uint8_t cfg_count, uint8_t sensor_num)
Definition: sensor.c:786
struct _sq52205_init_arg_ sq52205_init_arg
struct _vistara_init_arg_ vistara_init_arg
struct _pex89000_init_arg pex89000_init_arg
struct _nct7718w_init_arg_ nct7718w_init_arg
bool dc_access(uint8_t sensor_num)
Definition: sensor.c:1124
LTC4282_OFFSET
Definition: sensor.h:50
@ LTC4282_POWER_OFFSET
Definition: sensor.h:53
@ LTC4282_VSOURCE_OFFSET
Definition: sensor.h:54
@ LTC4282_ADC_CONTROL_OFFSET
Definition: sensor.h:55
@ LTC4282_STATUS_OFFSET_BYTE2
Definition: sensor.h:58
@ LTC4282_ILIM_ADJUST_OFFSET
Definition: sensor.h:51
@ LTC4282_STATUS_OFFSET_BYTE1
Definition: sensor.h:57
@ LTC4282_VSENSE_OFFSET
Definition: sensor.h:52
@ LTC4282_ENERGY_OFFSET
Definition: sensor.h:56
struct _nv_satmc_init_arg nv_satmc_init_arg
uint8_t plat_get_config_size()
Definition: sensor.c:1408
struct _ddr5_init_power_arg_ ddr5_init_power_arg
struct _ltc4282_init_arg ltc4282_init_arg
INA230_OFFSET
Definition: sensor.h:81
@ INA230_ALT_OFFSET
Definition: sensor.h:89
@ INA230_PWR_OFFSET
Definition: sensor.h:85
@ INA230_CFG_OFFSET
Definition: sensor.h:82
@ INA230_CUR_OFFSET
Definition: sensor.h:86
@ INA230_VSH_VOL_OFFSET
Definition: sensor.h:83
@ INA230_BUS_VOL_OFFSET
Definition: sensor.h:84
@ INA230_CAL_OFFSET
Definition: sensor.h:87
@ INA230_MSK_OFFSET
Definition: sensor.h:88
#define MAX_SENSOR_NAME_LENGTH
Definition: sensor_shell.h:23
uint8_t sensor_num
Definition: storage_handler.h:6
Definition: sensor.h:768
bool external_vref
Definition: sensor.h:770
bool is_init
Definition: sensor.h:769
float scalefactor[8]
Definition: sensor.h:772
float vref
Definition: sensor.h:771
Definition: sensor.h:358
uint16_t lower_bound
Definition: sensor.h:360
uint16_t upper_bound
Definition: sensor.h:359
bool deglitch_en
Definition: sensor.h:361
Definition: sensor.h:364
bool is_init
Definition: sensor.h:365
adc_asd_deglitch_arg deglitch[8]
Definition: sensor.h:366
Definition: sensor.h:606
bool is_need_set_pwr_cfg
Definition: sensor.h:626
uint16_t TSFILT
Definition: sensor.h:620
uint16_t IRANGE
Definition: sensor.h:610
bool is_init
Definition: sensor.h:625
uint16_t SIMULTANEOUS
Definition: sensor.h:619
uint16_t VRANGE
Definition: sensor.h:615
uint16_t VOUT_EN
Definition: sensor.h:611
uint16_t VIN_EN
Definition: sensor.h:612
uint16_t value
Definition: sensor.h:608
uint16_t PWR_AVG
Definition: sensor.h:618
uint16_t VI_AVG
Definition: sensor.h:617
uint16_t RSV2
Definition: sensor.h:616
union _adm1272_init_arg::@124 pwr_monitor_cfg
uint16_t PMON_MODE
Definition: sensor.h:614
uint16_t TEMP1_EN
Definition: sensor.h:613
float r_sense_mohm
Definition: sensor.h:627
struct _adm1272_init_arg::@124::@125 fields
Definition: sensor.h:369
uint16_t PMON_MODE
Definition: sensor.h:378
uint16_t RSV2
Definition: sensor.h:379
uint16_t VI_AVG
Definition: sensor.h:380
uint16_t RSV1
Definition: sensor.h:374
uint16_t value
Definition: sensor.h:372
bool is_init
Definition: sensor.h:390
uint16_t SIMULTANEOUS
Definition: sensor.h:382
uint16_t TSFILT
Definition: sensor.h:383
uint16_t PWR_AVG
Definition: sensor.h:381
uint16_t VIN_EN
Definition: sensor.h:376
union _adm1278_init_arg::@106 config
uint16_t VOUT_EN
Definition: sensor.h:375
struct _adm1278_init_arg::@106::@107 fields
uint16_t TEMP1_EN
Definition: sensor.h:377
float r_sense
Definition: sensor.h:387
Definition: sensor.h:584
uint8_t retry
Definition: sensor.h:586
uint32_t data
Definition: sensor.h:585
Definition: sensor.h:746
uint16_t sensor_id
Definition: sensor.h:749
uint8_t endpoint
Definition: sensor.h:748
bool is_init
Definition: sensor.h:747
Definition: sensor.h:594
uint8_t port_number
Definition: sensor.h:596
uint8_t HID_code
Definition: sensor.h:595
Definition: sensor.h:599
float ts1_temp
Definition: sensor.h:603
float ts0_temp
Definition: sensor.h:602
uint8_t HID_code
Definition: sensor.h:600
uint8_t port_number
Definition: sensor.h:601
Definition: sensor.h:725
bool is_init
Definition: sensor.h:726
uint8_t alert_mode
Definition: sensor.h:728
uint8_t local_temp_therm_limit
Definition: sensor.h:732
uint8_t alert_mask
Definition: sensor.h:729
uint8_t remote_temp_therm_limit
Definition: sensor.h:731
uint8_t configuration
Definition: sensor.h:730
uint8_t remote_T_high_limit
Definition: sensor.h:727
Definition: sensor.h:529
double cur_lsb
Definition: sensor.h:576
double i_max
Definition: sensor.h:571
uint16_t CVRF
Definition: sensor.h:558
uint16_t AVG
Definition: sensor.h:537
union _ina230_init_arg::@119 alt_cfg
uint16_t LEN
Definition: sensor.h:555
union _ina230_init_arg::@118 config
uint16_t POL
Definition: sensor.h:562
uint16_t CNVR
Definition: sensor.h:561
uint16_t BUL
Definition: sensor.h:563
double r_shunt
Definition: sensor.h:544
uint16_t reserved
Definition: sensor.h:538
double alert_value
Definition: sensor.h:549
double pwr_lsb
Definition: sensor.h:577
uint16_t VBUS_CT
Definition: sensor.h:536
uint16_t RST
Definition: sensor.h:539
uint16_t SUL
Definition: sensor.h:565
uint16_t value
Definition: sensor.h:532
uint16_t MODE
Definition: sensor.h:534
uint16_t AFF
Definition: sensor.h:559
uint16_t APOL
Definition: sensor.h:556
uint16_t OVF
Definition: sensor.h:557
uint16_t VSH_CT
Definition: sensor.h:535
bool is_init
Definition: sensor.h:580
uint16_t BOL
Definition: sensor.h:564
uint16_t SOL
Definition: sensor.h:566
Definition: sensor.h:489
bool is_init
Definition: sensor.h:490
uint8_t rsvd
Definition: sensor.h:514
float r_shunt
Definition: sensor.h:492
uint16_t rsvd
Definition: sensor.h:502
uint16_t shunt_volt_time
Definition: sensor.h:499
uint8_t ein_status
Definition: sensor.h:515
uint16_t vin_ov_warn_limit
Definition: sensor.h:520
uint16_t value
Definition: sensor.h:496
uint8_t apol
Definition: sensor.h:509
union _ina233_init_arg_::@113 mfr_device_config
uint8_t alert_behavior
Definition: sensor.h:510
uint8_t i2c_filt
Definition: sensor.h:512
float current_lsb
Definition: sensor.h:491
uint16_t operating_mode
Definition: sensor.h:498
uint16_t iout_oc_warn_limit
Definition: sensor.h:519
bool is_need_set_alert_threshold
Definition: sensor.h:518
uint8_t ein_autoclear
Definition: sensor.h:511
uint8_t value
Definition: sensor.h:507
union _ina233_init_arg_::@112 mfr_config
uint16_t pin_op_warn_limit
Definition: sensor.h:522
uint16_t aver_mode
Definition: sensor.h:501
bool mfr_config_init
Definition: sensor.h:493
uint16_t vin_uv_warn_limit
Definition: sensor.h:521
uint16_t bus_volt_time
Definition: sensor.h:500
uint8_t ein_accum
Definition: sensor.h:513
bool is_need_mfr_device_config_init
Definition: sensor.h:505
uint16_t FORCEINTR
Definition: sensor.h:343
uint16_t value
Definition: sensor.h:334
bool do_config
Definition: sensor.h:332
union _isl28022_init_arg::aux_control_config::@104 config
uint16_t resv
Definition: sensor.h:344
uint16_t ExtClkEn
Definition: sensor.h:339
uint16_t ExtCLKDiv
Definition: sensor.h:337
uint16_t INTREN
Definition: sensor.h:341
struct _isl28022_init_arg::aux_control_config::@104::@105 fields
float min_threshold_limit
Definition: sensor.h:327
float max_threshold_limit
Definition: sensor.h:328
bool do_config
Definition: sensor.h:325
Definition: sensor.h:310
struct _isl28022_init_arg::@102::@103 fields
uint16_t MODE
Definition: sensor.h:315
union _isl28022_init_arg::@102 config
bool is_init
Definition: sensor.h:354
uint16_t SADC
Definition: sensor.h:316
uint16_t BADC
Definition: sensor.h:317
struct _isl28022_init_arg::bus_volt_threshold_config bus_volt_threshold_config
uint16_t BRNG
Definition: sensor.h:319
uint16_t PG
Definition: sensor.h:318
uint16_t value
Definition: sensor.h:313
float current_LSB
Definition: sensor.h:352
uint32_t r_shunt
Definition: sensor.h:350
struct _isl28022_init_arg::aux_control_config aux_control_config
uint16_t RST
Definition: sensor.h:320
Definition: sensor.h:685
uint8_t V5_V6_TEMPERATURE
Definition: sensor.h:704
bool is_init
Definition: sensor.h:686
uint8_t V5_V6_DIFFERENTIAL
Definition: sensor.h:703
uint8_t V7_V8_TEMPERATURE
Definition: sensor.h:708
uint8_t T4_KELVIN
Definition: sensor.h:709
uint8_t V3_V4_DIFFERENTIAL
Definition: sensor.h:694
union _ltc2991_init_arg_::@135 v1_v4_control_operation
uint8_t V1_V2_DIFFERENTIAL
Definition: sensor.h:690
struct _ltc2991_init_arg_::@135::@137 fields
uint8_t V5_V6_FILT
Definition: sensor.h:706
uint8_t T1_KELVIN
Definition: sensor.h:692
uint8_t V3_V4_TEMPERATURE
Definition: sensor.h:695
uint8_t T3_KELVIN
Definition: sensor.h:705
uint8_t V1_V2_TEMPERATURE
Definition: sensor.h:691
uint8_t V7_V8_DIFFERENTIAL
Definition: sensor.h:707
int value
Definition: sensor.h:688
union _ltc2991_init_arg_::@136 v5_v8_control_operation
uint8_t V3_V4_FILT
Definition: sensor.h:697
uint8_t T2_KELVIN
Definition: sensor.h:696
uint8_t V7_V8_FILT
Definition: sensor.h:710
uint8_t V1_V2_FILT
Definition: sensor.h:693
Definition: sensor.h:403
uint8_t _16_bit
Definition: sensor.h:408
uint8_t value
Definition: sensor.h:406
uint8_t gpio_mode
Definition: sensor.h:409
bool is_init
Definition: sensor.h:420
float r_sense_mohm
Definition: sensor.h:417
uint8_t vsource_vdd
Definition: sensor.h:410
uint8_t ilim_adjust
Definition: sensor.h:412
uint8_t foldback_mode
Definition: sensor.h:411
uint8_t is_register_setting_needed
Definition: sensor.h:426
struct _ltc4282_init_arg::@108::@109 fields
Definition: sensor.h:429
uint16_t value
Definition: sensor.h:432
uint16_t reserved_2
Definition: sensor.h:438
uint16_t ilim
Definition: sensor.h:437
uint16_t reserved_1
Definition: sensor.h:436
union _ltc4286_init_arg::@110 mfr_config_1
bool is_init
Definition: sensor.h:444
float r_sense_mohm
Definition: sensor.h:442
struct _ltc4286_init_arg::@110::@111 fields
uint16_t vrange_select
Definition: sensor.h:435
uint16_t vpwr_select
Definition: sensor.h:434
Definition: sensor.h:752
uint8_t mode
Definition: sensor.h:754
bool is_init
Definition: sensor.h:753
uint8_t config_byte
Definition: sensor.h:756
float scalefactor[12]
Definition: sensor.h:757
uint8_t setup_byte
Definition: sensor.h:755
Definition: sensor.h:525
float r_load
Definition: sensor.h:526
Definition: sensor.h:742
bool is_init
Definition: sensor.h:743
Definition: sensor.h:447
uint16_t iout_cal_gain
Definition: sensor.h:449
bool is_init
Definition: sensor.h:456
uint16_t iout_oc_fault_limit
Definition: sensor.h:451
uint16_t ocw_sc_ref
Definition: sensor.h:453
Definition: sensor.h:715
uint8_t rt1_critical_temperature
Definition: sensor.h:721
uint8_t alert_mask
Definition: sensor.h:719
uint8_t configuration
Definition: sensor.h:720
uint8_t rt_filter_alert_mode
Definition: sensor.h:718
bool is_init
Definition: sensor.h:716
uint8_t lt_critical_temperature
Definition: sensor.h:722
uint8_t rt1_high_alert_temp
Definition: sensor.h:717
Definition: sensor.h:760
uint8_t state_sensor_idx
Definition: sensor.h:764
uint8_t endpoint
Definition: sensor.h:762
pldm_sensor_pdr_parm parm
Definition: sensor.h:765
bool is_init
Definition: sensor.h:761
uint16_t sensor_id
Definition: sensor.h:763
Definition: sensor.h:394
uint8_t idx
Definition: sensor.h:395
struct k_mutex brcm_pciesw
Definition: sensor.h:396
bool is_init
Definition: sensor.h:399
Definition: pldm_monitor.h:202
Definition: sensor.h:589
uint8_t dimm_id
Definition: sensor.h:591
bool is_init
Definition: sensor.h:590
Definition: sensor.h:473
uint8_t smbus_addr
Definition: sensor.h:476
uint8_t smbus_bus_identifier
Definition: sensor.h:475
bool is_init
Definition: sensor.h:474
Definition: sensor.h:735
bool is_init
Definition: sensor.h:739
uint8_t temp_cal_code_pma_b[4]
Definition: sensor.h:737
uint8_t temp_cal_code_avg
Definition: sensor.h:738
uint8_t temp_cal_code_pma_a[4]
Definition: sensor.h:736
Definition: sensor.h:460
uint16_t iout_oc_fault_limit
Definition: sensor.h:464
bool is_init
Definition: sensor.h:469
uint16_t ocw_sc_ref
Definition: sensor.h:466
uint16_t iout_cal_gain
Definition: sensor.h:462
Definition: sensor.h:479
float current_lsb
Definition: sensor.h:481
bool is_init
Definition: sensor.h:480
float r_shunt
Definition: sensor.h:482
Definition: sensor.h:256
bool(* pre_sensor_read_hook)(struct _sensor_cfg_ *, void *)
Definition: sensor.h:270
uint8_t num
Definition: sensor.h:257
uint8_t target_addr
Definition: sensor.h:260
int cache
Definition: sensor.h:268
bool(* post_sensor_read_hook)(struct _sensor_cfg_ *, void *, int *)
Definition: sensor.h:272
int sample_count
Definition: sensor.h:265
uint8_t(* read)(struct _sensor_cfg_ *, int *)
Definition: sensor.h:280
uint8_t(* init)(uint8_t, int *)
Definition: sensor.h:279
int64_t poll_time
Definition: sensor.h:266
uint16_t offset
Definition: sensor.h:261
uint8_t port
Definition: sensor.h:259
int arg0
Definition: sensor.h:263
void * post_sensor_read_args
Definition: sensor.h:273
void * priv_data
Definition: sensor.h:277
uint8_t cache_status
Definition: sensor.h:269
void * init_args
Definition: sensor.h:274
void * pre_sensor_read_args
Definition: sensor.h:271
bool(* access_checker)(uint8_t)
Definition: sensor.h:262
uint8_t type
Definition: sensor.h:258
bool is_enable_polling
Definition: sensor.h:267
uint8_t retry
Definition: sensor.h:278
int arg1
Definition: sensor.h:264
Definition: sensor.h:295
uint8_t(* init)(struct _sensor_cfg_ *)
Definition: sensor.h:297
enum SENSOR_DEV dev
Definition: sensor.h:296
Definition: sensor.h:283
bool(* post_monitor)(uint8_t, void *)
Definition: sensor.h:289
uint8_t cfg_count
Definition: sensor.h:285
uint8_t access_checker_arg
Definition: sensor.h:287
void * pre_post_monitor_arg
Definition: sensor.h:290
char table_name[MAX_SENSOR_NAME_LENGTH]
Definition: sensor.h:292
bool(* pre_monitor)(uint8_t, void *)
Definition: sensor.h:288
bool(* access_checker)(uint8_t)
Definition: sensor.h:286
void * priv_data
Definition: sensor.h:291
sensor_cfg * monitor_sensor_cfg
Definition: sensor.h:284
Definition: sensor.h:300
uint8_t sensor_num
Definition: sensor.h:301
int64_t last_access_time
Definition: sensor.h:302
Definition: sensor.h:200
int16_t fraction
Definition: sensor.h:202
int16_t integer
Definition: sensor.h:201
Definition: sensor.h:637
union _sq52205_init_arg_::@128 alert_mask_config
uint16_t aver_mode
Definition: sensor.h:647
uint16_t value
Definition: sensor.h:642
uint8_t bus_voltage_ov
Definition: sensor.h:676
uint8_t ein_accum
Definition: sensor.h:663
uint8_t shunt_voltage_ov
Definition: sensor.h:678
float current_lsb
Definition: sensor.h:639
uint16_t shunt_volt_time
Definition: sensor.h:645
uint8_t switch_ein_mode
Definition: sensor.h:658
uint16_t alert_threshold
Definition: sensor.h:682
uint8_t resv
Definition: sensor.h:679
union _sq52205_init_arg_::@127 accum_config
uint8_t ein_auto_clear
Definition: sensor.h:661
uint8_t shunt_voltage_uv
Definition: sensor.h:677
uint8_t value
Definition: sensor.h:672
float r_shunt
Definition: sensor.h:640
uint16_t reset_bit
Definition: sensor.h:649
bool is_need_accum_config_init
Definition: sensor.h:653
uint8_t timer
Definition: sensor.h:660
uint8_t rsvd
Definition: sensor.h:659
bool is_init
Definition: sensor.h:638
uint8_t switch_adc_mode
Definition: sensor.h:662
uint8_t accum_mode
Definition: sensor.h:664
bool is_need_set_alert_threshold
Definition: sensor.h:669
uint8_t bus_voltage_uv
Definition: sensor.h:675
uint16_t rsvd
Definition: sensor.h:648
union _sq52205_init_arg_::@126 config
uint16_t bus_volt_time
Definition: sensor.h:646
uint8_t clear_ein
Definition: sensor.h:657
uint8_t ein_status
Definition: sensor.h:665
uint16_t operating_mode
Definition: sensor.h:644
uint8_t power_over_bit
Definition: sensor.h:674
Definition: sensor.h:485
bool is_cached
Definition: sensor.h:486
Definition: sensor.h:305
uint8_t vr_page
Definition: sensor.h:306
Definition: sensor.h:779
float vout_scale
Definition: sensor.h:781
bool vout_scale_enable
Definition: sensor.h:780
Definition: sensor.h:775
bool vout_scale_enable
Definition: sensor.h:776
Definition: sensor.h:205
uint8_t addr
Definition: sensor.h:206
uint8_t chan
Definition: sensor.h:207