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
193
197};
198
199typedef struct _sensor_val {
200 int16_t integer;
201 int16_t fraction;
203
204struct tca9548 {
205 uint8_t addr;
206 uint8_t chan;
207};
208
209static inline int calculate_accurate_MBR(uint8_t sensor_num, int val)
210{ // for better accuracy, enlarge SDR to two byte scale
211 if (SDR_M(sensor_num) == 0) {
212 return ((val << 8) * SDR_Rexp(sensor_num));
213 }
214 return ((val << 8) / SDR_M(sensor_num) * SDR_Rexp(sensor_num));
215}
216
217static inline int calculate_MBR(uint8_t sensor_num, int val)
218{
219 if (SDR_M(sensor_num) == 0) {
220 return (val * SDR_Rexp(sensor_num) + round_add(sensor_num, val));
221 }
222 return (val * SDR_Rexp(sensor_num) / SDR_M(sensor_num) + round_add(sensor_num, val));
223}
224
225static inline float convert_MBR_to_reading(uint8_t sensor_num, uint8_t val)
226{
227 if (SDR_M(sensor_num) == 0) {
228 return (val - round_add(sensor_num, val)) / SDR_Rexp(sensor_num);
229 }
230
231 return (val - round_add(sensor_num, val)) * SDR_M(sensor_num) / SDR_Rexp(sensor_num);
232}
233
234enum {
238 SENSOR_NOT_ACCESSIBLE, // Only use to check sensor access fail
251};
252
254
255typedef struct _sensor_cfg_ {
256 uint8_t num;
257 uint8_t type;
258 uint8_t port; // port, bus, channel, etc.
259 uint8_t target_addr;
260 uint16_t offset;
261 bool (*access_checker)(uint8_t);
262 int arg0;
263 int arg1;
265 int64_t poll_time; // sec
267 int cache;
269 bool (*pre_sensor_read_hook)(struct _sensor_cfg_ *, void *);
271 bool (*post_sensor_read_hook)(struct _sensor_cfg_ *, void *, int *);
274
275 /* if there is new parameter should be added, please add on above */
277 uint8_t retry;
278 uint8_t (*init)(uint8_t, int *);
279 uint8_t (*read)(struct _sensor_cfg_ *, int *);
281
284 uint8_t cfg_count;
285 bool (*access_checker)(uint8_t);
287 bool (*pre_monitor)(uint8_t, void *);
288 bool (*post_monitor)(uint8_t, void *);
293
294typedef struct _sensor_drive_api {
296 uint8_t (*init)(struct _sensor_cfg_ *);
298
299typedef struct _sensor_poll_time_cfg {
300 uint8_t sensor_num;
303
304typedef struct _vr_page_cfg {
305 uint8_t vr_page;
307
308/* INIT arg */
309typedef struct _isl28022_init_arg {
310 /* value to set configuration register */
311 union {
312 uint16_t value;
313 struct {
314 uint16_t MODE : 3;
315 uint16_t SADC : 4;
316 uint16_t BADC : 4;
317 uint16_t PG : 2;
318 uint16_t BRNG : 2;
319 uint16_t RST : 1;
322
325 /* The threshold of Volts */
329
332 union {
333 uint16_t value;
334 struct {
335 /* External Clock Divider bits*/
336 uint16_t ExtCLKDiv : 6;
337 /* External Clock Enable bit */
338 uint16_t ExtClkEn : 1;
339 /* Interrupt Enable bit*/
340 uint16_t INTREN : 1;
341 /* Force Interrupt bit */
342 uint16_t FORCEINTR : 1;
343 uint16_t resv : 7;
347
348 /* R_shunt valus, unit: milliohm */
349 uint32_t r_shunt;
350 /* used when read current/power */
352 /* Initialize function will set following arguments, no need to give value */
354
356
357typedef struct _adc_asd_deglitch_arg {
358 uint16_t upper_bound;
359 uint16_t lower_bound;
362
363typedef struct _adc_asd_init_arg {
367
368typedef struct _adm1278_init_arg {
369 /* value to set configuration register */
370 union {
371 uint16_t value;
372 struct {
373 uint16_t RSV1 : 1;
374 uint16_t VOUT_EN : 1;
375 uint16_t VIN_EN : 1;
376 uint16_t TEMP1_EN : 1;
377 uint16_t PMON_MODE : 1;
378 uint16_t RSV2 : 3;
379 uint16_t VI_AVG : 3;
380 uint16_t PWR_AVG : 3;
381 uint16_t SIMULTANEOUS : 1;
382 uint16_t TSFILT : 1;
385 /* Rsense valus, unit: milliohm */
386 float r_sense;
387
388 /* Initialize function will set following arguments, no need to give value */
390
392
393typedef struct _pex89000_init_arg {
394 uint8_t idx;
395 struct k_mutex brcm_pciesw;
396
397 /* Initialize function will set following arguments, no need to give value */
399
401
402typedef struct _ltc4282_init_arg {
403 /* value to get/set ILIM ADJUST register */
404 union {
405 uint8_t value;
406 struct {
407 uint8_t _16_bit : 1;
408 uint8_t gpio_mode : 1;
409 uint8_t vsource_vdd : 1;
410 uint8_t foldback_mode : 2;
411 uint8_t ilim_adjust : 3;
414
415 /* Rsense valus, unit: milliohm */
417
418 /* Initialize function will set following arguments, no need to give value */
420
421 /* Initialized chip registers if it's needed
422 * bit 0 - ilim adjust register setting
423 * bit 1 to 7 are reserved
424 */
427
428typedef struct _ltc4286_init_arg {
429 /* value to get/set MFR CONFIG 1 register */
430 union {
431 uint16_t value;
432 struct {
433 uint16_t vpwr_select : 1;
434 uint16_t vrange_select : 1;
435 uint16_t reserved_1 : 8; // bit[9:2] are reserved.
436 uint16_t ilim : 4;
437 uint16_t reserved_2 : 2; // bit[15:14] are reserved.
440 /* Rsense valus, unit: milliohm */
442 /* Initailize function will set following arguments, no need to give value */
445
446typedef struct _mp5990_init_arg {
447 /* value to sets the gain for output current reporting */
449 /* value to sets the IMON based total over current fault limit */
451 /* value to sets the SCREF and OCWREF voltage level. */
452 uint16_t ocw_sc_ref;
453
454 /* Initialize function will set following arguments, no need to give value */
456
458
459typedef struct _rs31380r_init_arg {
460 /* value to sets the gain for output current reporting */
462 /* value to sets the IMON based total over current fault limit */
464 /* value to sets the SCREF and OCWREF voltage level. */
465 uint16_t ocw_sc_ref;
466
467 /* Initialize function will set following arguments, no need to give value */
469
471
472typedef struct _pmic_init_arg {
475 uint8_t smbus_addr;
477
478typedef struct _rtq6056_init_arg_ {
481 float r_shunt;
483
484typedef struct _vistara_init_arg_ {
487
488typedef struct _ina233_init_arg_ {
491 float r_shunt;
493 /* value to get/set MFR CONFIG register */
494 union {
495 uint16_t value;
496 struct {
497 uint16_t operating_mode : 3;
498 uint16_t shunt_volt_time : 3;
499 uint16_t bus_volt_time : 3;
500 uint16_t aver_mode : 3;
501 uint16_t rsvd : 4; // bit[15:12] are reserved.
502 };
505 union {
506 uint8_t value;
507 struct {
508 uint8_t apol : 1;
509 uint8_t alert_behavior : 1;
510 uint8_t ein_autoclear : 1;
511 uint8_t i2c_filt : 1;
512 uint8_t ein_accum : 2;
513 uint8_t rsvd : 1;
514 uint8_t ein_status : 1;
515 };
523
524typedef struct _max16550a_init_arg_ {
525 float r_load;
527
528typedef struct _ina230_init_arg {
529 /* value to set configuration register */
530 union {
531 uint16_t value;
532 struct {
533 uint16_t MODE : 3;
534 uint16_t VSH_CT : 3;
535 uint16_t VBUS_CT : 3;
536 uint16_t AVG : 3;
537 uint16_t reserved : 3;
538 uint16_t RST : 1;
539 };
541
542 /* Shunt resistor value. Unit: Ohm. */
543 double r_shunt;
544
545 /* Alert value.
546 * The unit is Volt or Watt, depending on the alert function.
547 */
549
550 /* value to set alert register */
551 union {
552 uint16_t value;
553 struct {
554 uint16_t LEN : 1;
555 uint16_t APOL : 1;
556 uint16_t OVF : 1;
557 uint16_t CVRF : 1;
558 uint16_t AFF : 1;
559 uint16_t reserved : 5;
560 uint16_t CNVR : 1;
561 uint16_t POL : 1; // Lowest priority
562 uint16_t BUL : 1;
563 uint16_t BOL : 1;
564 uint16_t SUL : 1;
565 uint16_t SOL : 1; // Highest priority
566 };
568
569 /* Expected maximum current */
570 double i_max;
571
572 /* The current/power value per 1 bit.
573 * The unit is Amp or Watt, depending on the respective register.
574 */
575 double cur_lsb;
576 double pwr_lsb;
577
578 /* Initialize function will set following arguments, no need to give value */
580
582
584 uint32_t data;
585 uint8_t retry;
587
588typedef struct _pm8702_dimm_init_arg {
590 uint8_t dimm_id;
592
593typedef struct _ddr5_init_power_arg_ {
594 uint8_t HID_code;
595 uint8_t port_number;
597
598typedef struct _ddr5_init_temp_arg_ {
599 uint8_t HID_code;
600 uint8_t port_number;
601 float ts0_temp;
602 float ts1_temp;
604
605typedef struct _adm1272_init_arg {
606 union {
607 uint16_t value;
608 struct {
609 uint16_t IRANGE : 1;
610 uint16_t VOUT_EN : 1;
611 uint16_t VIN_EN : 1;
612 uint16_t TEMP1_EN : 1;
613 uint16_t PMON_MODE : 1;
614 uint16_t VRANGE : 1;
615 uint16_t RSV2 : 2;
616 uint16_t VI_AVG : 3;
617 uint16_t PWR_AVG : 3;
618 uint16_t SIMULTANEOUS : 1;
619 uint16_t TSFILT : 1;
622
623 /* Initialize function will set following arguments, no need to give value */
627
628#ifdef MORE_THAN_ONE_ADM1272
629 bool is_record_ein;
630 uint32_t last_energy;
631 uint32_t last_rollover;
632 uint32_t last_sample;
633#endif
635
636typedef struct _sq52205_init_arg_ {
639 float r_shunt;
640 union {
641 uint16_t value;
642 struct {
643 uint16_t operating_mode : 3;
644 uint16_t shunt_volt_time : 3;
645 uint16_t bus_volt_time : 3;
646 uint16_t aver_mode : 3;
647 uint16_t rsvd : 3; // bit[14:12] are reserved.
648 uint16_t reset_bit : 1;
649 };
651
653 union {
654 uint16_t value;
655 struct {
656 uint8_t clear_ein : 1;
657 uint8_t switch_ein_mode : 1;
658 uint8_t rsvd : 5;
659 uint8_t timer : 3;
660 uint8_t ein_auto_clear : 1;
661 uint8_t switch_adc_mode : 1;
662 uint8_t ein_accum : 2;
663 uint8_t accum_mode : 1;
664 uint8_t ein_status : 1;
665 };
667
669 union {
670 // Only use 5-bit for setting alert bit
671 uint8_t value;
672 struct {
673 uint8_t power_over_bit : 1;
674 uint8_t bus_voltage_uv : 1;
675 uint8_t bus_voltage_ov : 1;
676 uint8_t shunt_voltage_uv : 1;
677 uint8_t shunt_voltage_ov : 1;
678 uint8_t resv : 3;
679 };
683
684typedef struct _ltc2991_init_arg_ {
686 union {
687 int value;
688 struct {
690 uint8_t V1_V2_TEMPERATURE : 1;
691 uint8_t T1_KELVIN : 1;
692 uint8_t V1_V2_FILT : 1;
694 uint8_t V3_V4_TEMPERATURE : 1;
695 uint8_t T2_KELVIN : 1;
696 uint8_t V3_V4_FILT : 1;
699 union {
700 int value;
701 struct {
703 uint8_t V5_V6_TEMPERATURE : 1;
704 uint8_t T3_KELVIN : 1;
705 uint8_t V5_V6_FILT : 1;
707 uint8_t V7_V8_TEMPERATURE : 1;
708 uint8_t T4_KELVIN : 1;
709 uint8_t V7_V8_FILT : 1;
713
714typedef struct _nct7718w_init_arg_ {
718 uint8_t alert_mask;
723
724typedef struct _g788p81u_init_arg_ {
727 uint8_t alert_mode;
728 uint8_t alert_mask;
733
734typedef struct _pt5161l_init_arg_ {
735 uint8_t temp_cal_code_pma_a[4]; // temp calibration codes for PMA A
736 uint8_t temp_cal_code_pma_b[4]; // temp calibration codes for PMA B
737 uint8_t temp_cal_code_avg; // average temp calibration code
740
741typedef struct _mp2985_init_arg {
744
745typedef struct _cx7_init_arg {
747 uint8_t endpoint;
748 uint16_t sensor_id;
750
751typedef struct _max11617_init_arg {
753 uint8_t setup_byte;
754 uint8_t config_byte;
755 float scalefactor[12];
757
758typedef struct _nv_satmc_init_arg {
760 uint8_t endpoint;
761 uint16_t sensor_id;
762 uint8_t state_sensor_idx; //only used for state sensor
763 pldm_sensor_pdr_parm parm; //only used for numeric sensor
765
766typedef struct _adc128d818_init_arg {
769 float vref;
770 float scalefactor[8];
772
773typedef struct mp2971_init_args {
776
777typedef struct isl69259_init_args {
781
782extern bool enable_sensor_poll_thread;
784// Mapping sensor number to sensor config index
786extern uint8_t sensor_config_count;
788extern uint16_t sensor_monitor_count;
789extern const char *const sensor_type_name[];
791
793uint8_t get_sensor_reading(sensor_cfg *cfg_table, uint8_t cfg_count, uint8_t sensor_num,
794 int *reading, uint8_t read_mode);
795void pal_set_sensor_poll_interval(int *interval_ms);
796bool stby_access(uint8_t sensor_num);
797bool dc_access(uint8_t sensor_num);
798bool e1s_pwrgd_access(uint8_t sensor_num);
799bool post_access(uint8_t sensor_num);
800bool me_access(uint8_t sensor_num);
801bool vr_access(uint8_t sensor_num);
802bool vr_stby_access(uint8_t sensor_num);
803bool sensor_init(void);
805void enable_sensor_poll();
807void pal_extend_sensor_config(void);
809void add_sensor_config(sensor_cfg config);
811bool pal_is_time_to_poll(uint8_t sensor_num, int poll_time);
812uint8_t plat_get_config_size();
813void load_sensor_config(void);
814void control_sensor_polling(uint8_t sensor_num, uint8_t optional, uint8_t cache_status);
819sensor_cfg *find_sensor_cfg_via_sensor_num(sensor_cfg *cfg_table, uint8_t cfg_count,
820 uint8_t sensor_num);
823uint8_t common_tbl_sen_reinit(uint8_t sen_num);
825
826#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:763
struct _ltc2991_init_arg_ ltc2991_init_arg
bool check_reading_pointer_null_is_allowed(sensor_cfg *cfg)
Definition: sensor.c:1430
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:1066
struct _max16550a_init_arg_ max16550a_init_arg
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:944
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
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:1140
void control_sensor_polling(uint8_t sensor_num, uint8_t optional, uint8_t cache_status)
Definition: sensor.c:1413
const char *const sensor_type_name[]
Definition: sensor.c:73
@ SENSOR_PRE_READ_ERROR
Definition: sensor.h:243
@ SENSOR_READ_API_UNREGISTER
Definition: sensor.h:245
@ SENSOR_NOT_ACCESSIBLE
Definition: sensor.h:238
@ SENSOR_UNAVAILABLE
Definition: sensor.h:250
@ SENSOR_FAIL_TO_ACCESS
Definition: sensor.h:239
@ SENSOR_READ_4BYTE_ACUR_SUCCESS
Definition: sensor.h:246
@ SENSOR_NOT_FOUND
Definition: sensor.h:237
@ SENSOR_PARAMETER_NOT_VALID
Definition: sensor.h:249
@ SENSOR_UNSPECIFIED_ERROR
Definition: sensor.h:241
@ SENSOR_INIT_STATUS
Definition: sensor.h:240
@ SENSOR_READ_SUCCESS
Definition: sensor.h:235
@ SENSOR_POLLING_DISABLE
Definition: sensor.h:242
@ SENSOR_POST_READ_ERROR
Definition: sensor.h:244
@ SENSOR_READ_ACUR_SUCCESS
Definition: sensor.h:236
@ SENSOR_PEC_ERROR
Definition: sensor.h:248
@ SENSOR_NOT_PRESENT
Definition: sensor.h:247
void plat_sensor_poll_post()
Definition: sensor.c:959
CONTROL_SENSOR_POLLING_OPTION
Definition: sensor.h:194
@ ENABLE_SENSOR_POLLING
Definition: sensor.h:196
@ DISABLE_SENSOR_POLLING
Definition: sensor.h:195
struct _sensor_drive_api sensor_drive_api
bool e1s_pwrgd_access(uint8_t sensor_num)
Definition: sensor.c:1121
void clear_unaccessible_sensor_cache(sensor_cfg *cfg)
Definition: sensor.c:802
struct isl69259_init_args isl69259_init_arg
bool init_drive_type_delayed(sensor_cfg *cfg)
Definition: sensor.c:1445
struct _mp2985_init_arg mp2985_init_arg
sensor_drive_api sensor_drive_tbl[]
Definition: sensor.c:364
bool get_sensor_init_done_flag()
Definition: sensor.c:1467
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:1086
uint16_t sensor_monitor_count
Definition: sensor.c:69
struct mp2971_init_args mp2971_init_arg
void enable_sensor_poll()
Definition: sensor.c:949
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:1173
struct _sensor_monitor_table_info sensor_monitor_table_info
bool sensor_init(void)
Definition: sensor.c:1343
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:1131
bool check_is_sensor_ready()
Definition: sensor.c:1395
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:191
@ 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_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:1405
bool enable_sensor_poll_thread
Definition: sensor.c:56
bool get_sensor_poll_enable_flag()
Definition: sensor.c:954
uint8_t pal_get_monitor_sensor_count()
Definition: sensor.c:1081
bool pal_is_time_to_poll(uint8_t sensor_num, int poll_time)
Definition: sensor.c:1055
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:812
bool stby_access(uint8_t sensor_num)
Definition: sensor.c:1111
struct _max11617_init_arg max11617_init_arg
bool post_access(uint8_t sensor_num)
Definition: sensor.c:1126
struct _adm1272_init_arg adm1272_init_arg
uint8_t common_tbl_sen_reinit(uint8_t sen_num)
Definition: sensor.c:1250
struct _ina233_init_arg_ ina233_init_arg
bool vr_stby_access(uint8_t sensor_num)
Definition: sensor.c:1148
void pal_set_sensor_poll_interval(int *interval_ms)
Definition: sensor.c:1060
@ SENSOR_INIT_SUCCESS
Definition: sensor.h:253
@ SENSOR_INIT_UNSPECIFIED_ERROR
Definition: sensor.h:253
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:778
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:1116
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:1400
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:766
bool external_vref
Definition: sensor.h:768
bool is_init
Definition: sensor.h:767
float scalefactor[8]
Definition: sensor.h:770
float vref
Definition: sensor.h:769
Definition: sensor.h:357
uint16_t lower_bound
Definition: sensor.h:359
uint16_t upper_bound
Definition: sensor.h:358
bool deglitch_en
Definition: sensor.h:360
Definition: sensor.h:363
bool is_init
Definition: sensor.h:364
adc_asd_deglitch_arg deglitch[8]
Definition: sensor.h:365
Definition: sensor.h:605
bool is_need_set_pwr_cfg
Definition: sensor.h:625
uint16_t TSFILT
Definition: sensor.h:619
uint16_t IRANGE
Definition: sensor.h:609
bool is_init
Definition: sensor.h:624
uint16_t SIMULTANEOUS
Definition: sensor.h:618
union _adm1272_init_arg::@114 pwr_monitor_cfg
uint16_t VRANGE
Definition: sensor.h:614
uint16_t VOUT_EN
Definition: sensor.h:610
uint16_t VIN_EN
Definition: sensor.h:611
uint16_t value
Definition: sensor.h:607
uint16_t PWR_AVG
Definition: sensor.h:617
uint16_t VI_AVG
Definition: sensor.h:616
uint16_t RSV2
Definition: sensor.h:615
uint16_t PMON_MODE
Definition: sensor.h:613
uint16_t TEMP1_EN
Definition: sensor.h:612
struct _adm1272_init_arg::@114::@115 fields
float r_sense_mohm
Definition: sensor.h:626
Definition: sensor.h:368
uint16_t PMON_MODE
Definition: sensor.h:377
union _adm1278_init_arg::@96 config
uint16_t RSV2
Definition: sensor.h:378
uint16_t VI_AVG
Definition: sensor.h:379
uint16_t RSV1
Definition: sensor.h:373
uint16_t value
Definition: sensor.h:371
bool is_init
Definition: sensor.h:389
uint16_t SIMULTANEOUS
Definition: sensor.h:381
uint16_t TSFILT
Definition: sensor.h:382
struct _adm1278_init_arg::@96::@97 fields
uint16_t PWR_AVG
Definition: sensor.h:380
uint16_t VIN_EN
Definition: sensor.h:375
uint16_t VOUT_EN
Definition: sensor.h:374
uint16_t TEMP1_EN
Definition: sensor.h:376
float r_sense
Definition: sensor.h:386
Definition: sensor.h:583
uint8_t retry
Definition: sensor.h:585
uint32_t data
Definition: sensor.h:584
Definition: sensor.h:745
uint16_t sensor_id
Definition: sensor.h:748
uint8_t endpoint
Definition: sensor.h:747
bool is_init
Definition: sensor.h:746
Definition: sensor.h:593
uint8_t port_number
Definition: sensor.h:595
uint8_t HID_code
Definition: sensor.h:594
Definition: sensor.h:598
float ts1_temp
Definition: sensor.h:602
float ts0_temp
Definition: sensor.h:601
uint8_t HID_code
Definition: sensor.h:599
uint8_t port_number
Definition: sensor.h:600
Definition: sensor.h:724
bool is_init
Definition: sensor.h:725
uint8_t alert_mode
Definition: sensor.h:727
uint8_t local_temp_therm_limit
Definition: sensor.h:731
uint8_t alert_mask
Definition: sensor.h:728
uint8_t remote_temp_therm_limit
Definition: sensor.h:730
uint8_t configuration
Definition: sensor.h:729
uint8_t remote_T_high_limit
Definition: sensor.h:726
Definition: sensor.h:528
double cur_lsb
Definition: sensor.h:575
double i_max
Definition: sensor.h:570
uint16_t CVRF
Definition: sensor.h:557
uint16_t AVG
Definition: sensor.h:536
union _ina230_init_arg::@109 alt_cfg
uint16_t LEN
Definition: sensor.h:554
uint16_t POL
Definition: sensor.h:561
uint16_t CNVR
Definition: sensor.h:560
uint16_t BUL
Definition: sensor.h:562
double r_shunt
Definition: sensor.h:543
uint16_t reserved
Definition: sensor.h:537
double alert_value
Definition: sensor.h:548
double pwr_lsb
Definition: sensor.h:576
uint16_t VBUS_CT
Definition: sensor.h:535
uint16_t RST
Definition: sensor.h:538
uint16_t SUL
Definition: sensor.h:564
uint16_t value
Definition: sensor.h:531
uint16_t MODE
Definition: sensor.h:533
uint16_t AFF
Definition: sensor.h:558
uint16_t APOL
Definition: sensor.h:555
uint16_t OVF
Definition: sensor.h:556
uint16_t VSH_CT
Definition: sensor.h:534
union _ina230_init_arg::@108 config
bool is_init
Definition: sensor.h:579
uint16_t BOL
Definition: sensor.h:563
uint16_t SOL
Definition: sensor.h:565
Definition: sensor.h:488
bool is_init
Definition: sensor.h:489
uint8_t rsvd
Definition: sensor.h:513
float r_shunt
Definition: sensor.h:491
uint16_t rsvd
Definition: sensor.h:501
uint16_t shunt_volt_time
Definition: sensor.h:498
uint8_t ein_status
Definition: sensor.h:514
uint16_t vin_ov_warn_limit
Definition: sensor.h:519
uint16_t value
Definition: sensor.h:495
uint8_t apol
Definition: sensor.h:508
union _ina233_init_arg_::@102 mfr_config
uint8_t alert_behavior
Definition: sensor.h:509
uint8_t i2c_filt
Definition: sensor.h:511
float current_lsb
Definition: sensor.h:490
uint16_t operating_mode
Definition: sensor.h:497
uint16_t iout_oc_warn_limit
Definition: sensor.h:518
bool is_need_set_alert_threshold
Definition: sensor.h:517
uint8_t ein_autoclear
Definition: sensor.h:510
union _ina233_init_arg_::@103 mfr_device_config
uint8_t value
Definition: sensor.h:506
uint16_t pin_op_warn_limit
Definition: sensor.h:521
uint16_t aver_mode
Definition: sensor.h:500
bool mfr_config_init
Definition: sensor.h:492
uint16_t vin_uv_warn_limit
Definition: sensor.h:520
uint16_t bus_volt_time
Definition: sensor.h:499
uint8_t ein_accum
Definition: sensor.h:512
bool is_need_mfr_device_config_init
Definition: sensor.h:504
uint16_t FORCEINTR
Definition: sensor.h:342
uint16_t value
Definition: sensor.h:333
union _isl28022_init_arg::aux_control_config::@94 config
bool do_config
Definition: sensor.h:331
uint16_t resv
Definition: sensor.h:343
uint16_t ExtClkEn
Definition: sensor.h:338
struct _isl28022_init_arg::aux_control_config::@94::@95 fields
uint16_t ExtCLKDiv
Definition: sensor.h:336
uint16_t INTREN
Definition: sensor.h:340
float min_threshold_limit
Definition: sensor.h:326
float max_threshold_limit
Definition: sensor.h:327
bool do_config
Definition: sensor.h:324
Definition: sensor.h:309
uint16_t MODE
Definition: sensor.h:314
bool is_init
Definition: sensor.h:353
uint16_t SADC
Definition: sensor.h:315
union _isl28022_init_arg::@92 config
uint16_t BADC
Definition: sensor.h:316
struct _isl28022_init_arg::bus_volt_threshold_config bus_volt_threshold_config
uint16_t BRNG
Definition: sensor.h:318
uint16_t PG
Definition: sensor.h:317
uint16_t value
Definition: sensor.h:312
struct _isl28022_init_arg::@92::@93 fields
float current_LSB
Definition: sensor.h:351
uint32_t r_shunt
Definition: sensor.h:349
struct _isl28022_init_arg::aux_control_config aux_control_config
uint16_t RST
Definition: sensor.h:319
Definition: sensor.h:684
uint8_t V5_V6_TEMPERATURE
Definition: sensor.h:703
bool is_init
Definition: sensor.h:685
uint8_t V5_V6_DIFFERENTIAL
Definition: sensor.h:702
union _ltc2991_init_arg_::@125 v1_v4_control_operation
uint8_t V7_V8_TEMPERATURE
Definition: sensor.h:707
struct _ltc2991_init_arg_::@125::@127 fields
uint8_t T4_KELVIN
Definition: sensor.h:708
uint8_t V3_V4_DIFFERENTIAL
Definition: sensor.h:693
union _ltc2991_init_arg_::@126 v5_v8_control_operation
uint8_t V1_V2_DIFFERENTIAL
Definition: sensor.h:689
uint8_t V5_V6_FILT
Definition: sensor.h:705
uint8_t T1_KELVIN
Definition: sensor.h:691
uint8_t V3_V4_TEMPERATURE
Definition: sensor.h:694
uint8_t T3_KELVIN
Definition: sensor.h:704
uint8_t V1_V2_TEMPERATURE
Definition: sensor.h:690
uint8_t V7_V8_DIFFERENTIAL
Definition: sensor.h:706
int value
Definition: sensor.h:687
uint8_t V3_V4_FILT
Definition: sensor.h:696
uint8_t T2_KELVIN
Definition: sensor.h:695
uint8_t V7_V8_FILT
Definition: sensor.h:709
uint8_t V1_V2_FILT
Definition: sensor.h:692
Definition: sensor.h:402
uint8_t _16_bit
Definition: sensor.h:407
uint8_t value
Definition: sensor.h:405
struct _ltc4282_init_arg::@98::@99 fields
uint8_t gpio_mode
Definition: sensor.h:408
bool is_init
Definition: sensor.h:419
float r_sense_mohm
Definition: sensor.h:416
uint8_t vsource_vdd
Definition: sensor.h:409
uint8_t ilim_adjust
Definition: sensor.h:411
uint8_t foldback_mode
Definition: sensor.h:410
uint8_t is_register_setting_needed
Definition: sensor.h:425
Definition: sensor.h:428
uint16_t value
Definition: sensor.h:431
uint16_t reserved_2
Definition: sensor.h:437
uint16_t ilim
Definition: sensor.h:436
union _ltc4286_init_arg::@100 mfr_config_1
uint16_t reserved_1
Definition: sensor.h:435
bool is_init
Definition: sensor.h:443
float r_sense_mohm
Definition: sensor.h:441
struct _ltc4286_init_arg::@100::@101 fields
uint16_t vrange_select
Definition: sensor.h:434
uint16_t vpwr_select
Definition: sensor.h:433
Definition: sensor.h:751
bool is_init
Definition: sensor.h:752
uint8_t config_byte
Definition: sensor.h:754
float scalefactor[12]
Definition: sensor.h:755
uint8_t setup_byte
Definition: sensor.h:753
Definition: sensor.h:524
float r_load
Definition: sensor.h:525
Definition: sensor.h:741
bool is_init
Definition: sensor.h:742
Definition: sensor.h:446
uint16_t iout_cal_gain
Definition: sensor.h:448
bool is_init
Definition: sensor.h:455
uint16_t iout_oc_fault_limit
Definition: sensor.h:450
uint16_t ocw_sc_ref
Definition: sensor.h:452
Definition: sensor.h:714
uint8_t rt1_critical_temperature
Definition: sensor.h:720
uint8_t alert_mask
Definition: sensor.h:718
uint8_t configuration
Definition: sensor.h:719
uint8_t rt_filter_alert_mode
Definition: sensor.h:717
bool is_init
Definition: sensor.h:715
uint8_t lt_critical_temperature
Definition: sensor.h:721
uint8_t rt1_high_alert_temp
Definition: sensor.h:716
Definition: sensor.h:758
uint8_t state_sensor_idx
Definition: sensor.h:762
uint8_t endpoint
Definition: sensor.h:760
pldm_sensor_pdr_parm parm
Definition: sensor.h:763
bool is_init
Definition: sensor.h:759
uint16_t sensor_id
Definition: sensor.h:761
Definition: sensor.h:393
uint8_t idx
Definition: sensor.h:394
struct k_mutex brcm_pciesw
Definition: sensor.h:395
bool is_init
Definition: sensor.h:398
Definition: pldm_monitor.h:202
Definition: sensor.h:588
uint8_t dimm_id
Definition: sensor.h:590
bool is_init
Definition: sensor.h:589
Definition: sensor.h:472
uint8_t smbus_addr
Definition: sensor.h:475
uint8_t smbus_bus_identifier
Definition: sensor.h:474
bool is_init
Definition: sensor.h:473
Definition: sensor.h:734
bool is_init
Definition: sensor.h:738
uint8_t temp_cal_code_pma_b[4]
Definition: sensor.h:736
uint8_t temp_cal_code_avg
Definition: sensor.h:737
uint8_t temp_cal_code_pma_a[4]
Definition: sensor.h:735
Definition: sensor.h:459
uint16_t iout_oc_fault_limit
Definition: sensor.h:463
bool is_init
Definition: sensor.h:468
uint16_t ocw_sc_ref
Definition: sensor.h:465
uint16_t iout_cal_gain
Definition: sensor.h:461
Definition: sensor.h:478
float current_lsb
Definition: sensor.h:480
bool is_init
Definition: sensor.h:479
float r_shunt
Definition: sensor.h:481
Definition: sensor.h:255
bool(* pre_sensor_read_hook)(struct _sensor_cfg_ *, void *)
Definition: sensor.h:269
uint8_t num
Definition: sensor.h:256
uint8_t target_addr
Definition: sensor.h:259
int cache
Definition: sensor.h:267
bool(* post_sensor_read_hook)(struct _sensor_cfg_ *, void *, int *)
Definition: sensor.h:271
int sample_count
Definition: sensor.h:264
uint8_t(* read)(struct _sensor_cfg_ *, int *)
Definition: sensor.h:279
uint8_t(* init)(uint8_t, int *)
Definition: sensor.h:278
int64_t poll_time
Definition: sensor.h:265
uint16_t offset
Definition: sensor.h:260
uint8_t port
Definition: sensor.h:258
int arg0
Definition: sensor.h:262
void * post_sensor_read_args
Definition: sensor.h:272
void * priv_data
Definition: sensor.h:276
uint8_t cache_status
Definition: sensor.h:268
void * init_args
Definition: sensor.h:273
void * pre_sensor_read_args
Definition: sensor.h:270
bool(* access_checker)(uint8_t)
Definition: sensor.h:261
uint8_t type
Definition: sensor.h:257
bool is_enable_polling
Definition: sensor.h:266
uint8_t retry
Definition: sensor.h:277
int arg1
Definition: sensor.h:263
Definition: sensor.h:294
uint8_t(* init)(struct _sensor_cfg_ *)
Definition: sensor.h:296
enum SENSOR_DEV dev
Definition: sensor.h:295
Definition: sensor.h:282
bool(* post_monitor)(uint8_t, void *)
Definition: sensor.h:288
uint8_t cfg_count
Definition: sensor.h:284
uint8_t access_checker_arg
Definition: sensor.h:286
void * pre_post_monitor_arg
Definition: sensor.h:289
char table_name[MAX_SENSOR_NAME_LENGTH]
Definition: sensor.h:291
bool(* pre_monitor)(uint8_t, void *)
Definition: sensor.h:287
bool(* access_checker)(uint8_t)
Definition: sensor.h:285
void * priv_data
Definition: sensor.h:290
sensor_cfg * monitor_sensor_cfg
Definition: sensor.h:283
Definition: sensor.h:299
uint8_t sensor_num
Definition: sensor.h:300
int64_t last_access_time
Definition: sensor.h:301
Definition: sensor.h:199
int16_t fraction
Definition: sensor.h:201
int16_t integer
Definition: sensor.h:200
Definition: sensor.h:636
uint16_t aver_mode
Definition: sensor.h:646
uint16_t value
Definition: sensor.h:641
uint8_t bus_voltage_ov
Definition: sensor.h:675
uint8_t ein_accum
Definition: sensor.h:662
uint8_t shunt_voltage_ov
Definition: sensor.h:677
float current_lsb
Definition: sensor.h:638
uint16_t shunt_volt_time
Definition: sensor.h:644
uint8_t switch_ein_mode
Definition: sensor.h:657
uint16_t alert_threshold
Definition: sensor.h:681
uint8_t resv
Definition: sensor.h:678
union _sq52205_init_arg_::@117 accum_config
uint8_t ein_auto_clear
Definition: sensor.h:660
uint8_t shunt_voltage_uv
Definition: sensor.h:676
uint8_t value
Definition: sensor.h:671
float r_shunt
Definition: sensor.h:639
uint16_t reset_bit
Definition: sensor.h:648
bool is_need_accum_config_init
Definition: sensor.h:652
uint8_t timer
Definition: sensor.h:659
uint8_t rsvd
Definition: sensor.h:658
bool is_init
Definition: sensor.h:637
uint8_t switch_adc_mode
Definition: sensor.h:661
uint8_t accum_mode
Definition: sensor.h:663
bool is_need_set_alert_threshold
Definition: sensor.h:668
uint8_t bus_voltage_uv
Definition: sensor.h:674
uint16_t rsvd
Definition: sensor.h:647
uint16_t bus_volt_time
Definition: sensor.h:645
uint8_t clear_ein
Definition: sensor.h:656
union _sq52205_init_arg_::@116 config
union _sq52205_init_arg_::@118 alert_mask_config
uint8_t ein_status
Definition: sensor.h:664
uint16_t operating_mode
Definition: sensor.h:643
uint8_t power_over_bit
Definition: sensor.h:673
Definition: sensor.h:484
bool is_cached
Definition: sensor.h:485
Definition: sensor.h:304
uint8_t vr_page
Definition: sensor.h:305
Definition: sensor.h:777
float vout_scale
Definition: sensor.h:779
bool vout_scale_enable
Definition: sensor.h:778
Definition: sensor.h:773
bool vout_scale_enable
Definition: sensor.h:774
Definition: sensor.h:204
uint8_t addr
Definition: sensor.h:205
uint8_t chan
Definition: sensor.h:206