OpenBIC
OpenSource Bridge-IC
pex89000.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 PEX_89000_H
18#define PEX_89000_H
19
20#include <stdint.h>
21#include "sensor.h"
22
24
25typedef enum pex_access {
36
41};
42
43/* sensor offset */
47};
48
49typedef struct {
50 uint8_t idx; // Create index based on init variable
51 struct k_mutex mutex;
53 sys_snode_t node; // linked list node
55
78};
79
80/* Note: Could be used only after pex89000 sensor init successed */
81uint8_t pex_access_engine(uint8_t bus, uint8_t addr, uint8_t idx, pex_access_t key, uint32_t *resp);
82uint8_t pex89000_init(sensor_cfg *cfg);
83
84#endif
uint8_t idx
Definition: plat_util.c:39
uint8_t addr
Definition: isl69259.c:0
pex_access
Definition: pex89000.h:25
@ pex_access_flash_ver
Definition: pex89000.h:31
@ pex_access_sbr_ver
Definition: pex89000.h:30
@ pex_access_ccr_system_error
Definition: pex89000.h:33
@ pex_access_temp
Definition: pex89000.h:26
@ pex_access_adc
Definition: pex89000.h:27
@ pex_access_rev_id
Definition: pex89000.h:29
@ pex_access_unknown
Definition: pex89000.h:34
@ pex_access_register
Definition: pex89000.h:32
@ pex_access_id
Definition: pex89000.h:28
PEX_CCR_SYSTEM_ERROR_STATUS
Definition: pex89000.h:56
@ PEX_PSB_STATION_FATAL_ERROR
Definition: pex89000.h:77
@ PEX_WDT0_SYSTEM_RESET
Definition: pex89000.h:62
@ PEX_WDT1_CPU_RESET
Definition: pex89000.h:63
@ PEX_ARM_FLASH_SIGNATURE_FAIL
Definition: pex89000.h:60
@ PEX_STATION_1_FATAL_ERROR
Definition: pex89000.h:69
@ PEX_STATION_0_FATAL_ERROR
Definition: pex89000.h:68
@ PEX_STATION_5_FATAL_ERROR
Definition: pex89000.h:73
@ PEX_WDT1_SYSTEM_RESET
Definition: pex89000.h:64
@ PEX_STATION_4_FATAL_ERROR
Definition: pex89000.h:72
@ PEX_STATION_7_FATAL_ERROR
Definition: pex89000.h:75
@ PEX_SECURE_BOOT_FAIL
Definition: pex89000.h:66
@ PEX_SYSTEM_ERROR
Definition: pex89000.h:57
@ PEX_STATION_3_FATAL_ERROR
Definition: pex89000.h:71
@ PEX_WDT0_CPU_RESET
Definition: pex89000.h:61
@ PEX_SBR_LOAD_FAIL
Definition: pex89000.h:67
@ PEX_LOCAL_CPU_PARITY_ERROR
Definition: pex89000.h:65
@ PEX_STATION_8_FATAL_ERROR
Definition: pex89000.h:76
@ PEX_STATION_6_FATAL_ERROR
Definition: pex89000.h:74
@ PEX_FATAL_ERROR
Definition: pex89000.h:58
@ PEX_POR_BISR_TIMEOUT
Definition: pex89000.h:59
@ PEX_STATION_2_FATAL_ERROR
Definition: pex89000.h:70
uint8_t pex89000_init(sensor_cfg *cfg)
Definition: pex89000.c:477
pex_sensor_offset
Definition: pex89000.h:44
@ PEX_TEMP
Definition: pex89000.h:45
@ PEX_ADC
Definition: pex89000.h:46
enum pex_dev pex_dev_t
pex_dev
Definition: pex89000.h:23
@ pex_dev_atlas2
Definition: pex89000.h:23
@ pex_dev_atlas1
Definition: pex89000.h:23
@ pex_dev_unknown
Definition: pex89000.h:23
pex_api_ret
Definition: pex89000.h:37
@ pex_api_success
Definition: pex89000.h:38
@ pex_api_mutex_err
Definition: pex89000.h:40
@ pex_api_unspecific_err
Definition: pex89000.h:39
enum pex_access pex_access_t
uint8_t pex_access_engine(uint8_t bus, uint8_t addr, uint8_t idx, pex_access_t key, uint32_t *resp)
Definition: pex89000.c:262
Definition: sensor.h:256
Definition: pex89000.h:49
uint8_t idx
Definition: pex89000.h:50
sys_snode_t node
Definition: pex89000.h:53
pex_dev_t pex_type
Definition: pex89000.h:52