OpenBIC
OpenSource Bridge-IC
plat_pwm.c File Reference
#include <drivers/pwm.h>
#include <logging/log.h>
#include "sensor.h"
#include "nct7363.h"
#include "plat_sensor_table.h"
#include "plat_hook.h"
#include "plat_fsc.h"
#include "plat_pwm.h"
#include "plat_status.h"
#include "plat_threshold.h"
Include dependency graph for plat_pwm.c:

Classes

struct  nct_dev_info
 

Macros

#define MAX_FAN_DUTY_VALUE   100
 
#define PWM_PERIOD   40
 

Functions

 LOG_MODULE_REGISTER (plat_pwm)
 
uint8_t nct7363_wdt_all_disable ()
 
uint8_t nct7363_wdt_all_enable ()
 
int ast_pwm_set (int duty)
 
uint8_t plat_pwm_ctrl (enum PWM_DEVICE_E dev, uint8_t duty)
 
uint8_t ctl_all_pwm_dev (uint8_t duty)
 
uint8_t set_pwm_group (uint8_t group, uint8_t duty)
 
uint8_t get_pwm_group_cache (uint8_t group)
 
uint8_t get_pwm_cache (uint8_t idx)
 
uint8_t manual_pwm_idx_to_pwm_idx (uint8_t idx)
 
uint8_t get_manual_pwm_flag (uint8_t idx)
 
void set_manual_pwm_flag (uint8_t idx, uint8_t flag)
 
uint8_t get_manual_pwm_cache (uint8_t idx)
 
void set_manual_pwm_cache (uint8_t idx, uint8_t duty)
 
void set_manual_pwm_cache_to_default (void)
 
void set_manual_pwm_cache_to_zero (void)
 
void init_pwm_dev (void)
 

Variables

struct nct_dev_info nct_dev_tbl []
 

Macro Definition Documentation

◆ MAX_FAN_DUTY_VALUE

#define MAX_FAN_DUTY_VALUE   100

◆ PWM_PERIOD

#define PWM_PERIOD   40

Function Documentation

◆ ast_pwm_set()

int ast_pwm_set ( int  duty)

◆ ctl_all_pwm_dev()

uint8_t ctl_all_pwm_dev ( uint8_t  duty)
Here is the call graph for this function:

◆ get_manual_pwm_cache()

uint8_t get_manual_pwm_cache ( uint8_t  idx)

◆ get_manual_pwm_flag()

uint8_t get_manual_pwm_flag ( uint8_t  idx)

◆ get_pwm_cache()

uint8_t get_pwm_cache ( uint8_t  idx)

◆ get_pwm_group_cache()

uint8_t get_pwm_group_cache ( uint8_t  group)

◆ init_pwm_dev()

void init_pwm_dev ( void  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pwm  )

◆ manual_pwm_idx_to_pwm_idx()

uint8_t manual_pwm_idx_to_pwm_idx ( uint8_t  idx)

◆ nct7363_wdt_all_disable()

uint8_t nct7363_wdt_all_disable ( )
Here is the call graph for this function:

◆ nct7363_wdt_all_enable()

uint8_t nct7363_wdt_all_enable ( )
Here is the call graph for this function:

◆ plat_pwm_ctrl()

uint8_t plat_pwm_ctrl ( enum PWM_DEVICE_E  dev,
uint8_t  duty 
)

◆ set_manual_pwm_cache()

void set_manual_pwm_cache ( uint8_t  idx,
uint8_t  duty 
)

◆ set_manual_pwm_cache_to_default()

void set_manual_pwm_cache_to_default ( void  )

◆ set_manual_pwm_cache_to_zero()

void set_manual_pwm_cache_to_zero ( void  )

◆ set_manual_pwm_flag()

void set_manual_pwm_flag ( uint8_t  idx,
uint8_t  flag 
)

◆ set_pwm_group()

uint8_t set_pwm_group ( uint8_t  group,
uint8_t  duty 
)

Variable Documentation

◆ nct_dev_tbl

struct nct_dev_info nct_dev_tbl[]
Initial value:
#define SENSOR_NUM_PB_1_PUMP_TACH_RPM
Definition: plat_sensor_table.h:162
#define SENSOR_NUM_FB_10_FAN_TACH_RPM
Definition: plat_sensor_table.h:157
#define SENSOR_NUM_PB_3_PUMP_TACH_RPM
Definition: plat_sensor_table.h:168
#define SENSOR_NUM_FB_9_FAN_TACH_RPM
Definition: plat_sensor_table.h:156
#define SENSOR_NUM_FB_14_FAN_TACH_RPM
Definition: plat_sensor_table.h:161
#define SENSOR_NUM_FB_5_FAN_TACH_RPM
Definition: plat_sensor_table.h:152
#define SENSOR_NUM_PB_2_PUMP_TACH_RPM
Definition: plat_sensor_table.h:165
#define SENSOR_NUM_FB_12_FAN_TACH_RPM
Definition: plat_sensor_table.h:159
#define SENSOR_NUM_FB_3_FAN_TACH_RPM
Definition: plat_sensor_table.h:150
#define SENSOR_NUM_FB_11_FAN_TACH_RPM
Definition: plat_sensor_table.h:158
#define SENSOR_NUM_FB_13_FAN_TACH_RPM
Definition: plat_sensor_table.h:160
#define SENSOR_NUM_FB_6_FAN_TACH_RPM
Definition: plat_sensor_table.h:153
#define SENSOR_NUM_FB_1_FAN_TACH_RPM
Definition: plat_sensor_table.h:148
#define SENSOR_NUM_FB_4_FAN_TACH_RPM
Definition: plat_sensor_table.h:151
#define SENSOR_NUM_PB_3_FAN_1_TACH_RPM
Definition: plat_sensor_table.h:169
#define SENSOR_NUM_FB_2_FAN_TACH_RPM
Definition: plat_sensor_table.h:149
#define SENSOR_NUM_FB_8_FAN_TACH_RPM
Definition: plat_sensor_table.h:155
#define SENSOR_NUM_PB_2_FAN_1_TACH_RPM
Definition: plat_sensor_table.h:166
#define SENSOR_NUM_FB_7_FAN_TACH_RPM
Definition: plat_sensor_table.h:154
#define SENSOR_NUM_PB_1_FAN_1_TACH_RPM
Definition: plat_sensor_table.h:163
@ NCT7363_2_PORT
Definition: nct7363.h:54
@ NCT7363_1_PORT
Definition: nct7363.h:53
@ NCT7363_17_PORT
Definition: nct7363.h:68
@ PWM_DEVICE_E_FB_FAN_14
Definition: plat_pwm.h:33
@ PWM_DEVICE_E_FB_FAN_2
Definition: plat_pwm.h:21
@ PWM_DEVICE_E_PB_PUMB_FAN_1
Definition: plat_pwm.h:37
@ PWM_DEVICE_E_PB_PUMB_FAN_2
Definition: plat_pwm.h:38
@ PWM_DEVICE_E_FB_FAN_3
Definition: plat_pwm.h:22
@ PWM_DEVICE_E_FB_FAN_8
Definition: plat_pwm.h:27
@ PWM_DEVICE_E_PB_PUMB_FAN_3
Definition: plat_pwm.h:39
@ PWM_DEVICE_E_FB_FAN_4
Definition: plat_pwm.h:23
@ PWM_DEVICE_E_FB_FAN_5
Definition: plat_pwm.h:24
@ PWM_DEVICE_E_FB_FAN_7
Definition: plat_pwm.h:26
@ PWM_DEVICE_E_PB_PUMB_3
Definition: plat_pwm.h:36
@ PWM_DEVICE_E_PB_PUMB_2
Definition: plat_pwm.h:35
@ PWM_DEVICE_E_FB_FAN_12
Definition: plat_pwm.h:31
@ PWM_DEVICE_E_FB_FAN_9
Definition: plat_pwm.h:28
@ PWM_DEVICE_E_FB_FAN_1
Definition: plat_pwm.h:20
@ PWM_DEVICE_E_FB_FAN_10
Definition: plat_pwm.h:29
@ PWM_DEVICE_E_FB_FAN_6
Definition: plat_pwm.h:25
@ PWM_DEVICE_E_FB_FAN_11
Definition: plat_pwm.h:30
@ PWM_DEVICE_E_PB_PUMB_1
Definition: plat_pwm.h:34
@ PWM_DEVICE_E_FB_FAN_13
Definition: plat_pwm.h:32