sonic-buildimage/platform/broadcom/sonic-platform-modules-tencent/common/modules/rg_wdt.h
tianshangfei b65e06f998
two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386)
Why I did it
Add two platform that support s3IP framework

How I did it
Add two platforms supporting S3IP SYSFS (TCS8400, TCS9400)

How to verify it
Manual test
2022-12-18 16:16:53 +08:00

47 lines
1.1 KiB
C

#ifndef __RG_WDT_H__
#define __RG_WDT_H__
#include <linux/of_gpio.h>
#define SYSFS_NO_CFG (0xff)
typedef struct gpio_wdt_info_s {
int gpio;
enum of_gpio_flags flags;
bool active_low;
bool state;
}gpio_wdt_info_t;
typedef struct logic_wdt_info_s {
const char *feed_dev_name;
uint8_t logic_func_mode;
uint32_t feed_reg;
uint8_t active_val;
uint8_t state_val;
}logic_wdt_info_t;
typedef struct rg_wdt_device_s {
int device_flag;
const char *config_dev_name;
uint8_t config_mode;
const char *hw_algo;
uint8_t enable_val;
uint8_t disable_val;
uint8_t enable_mask;
uint8_t priv_func_mode;
uint8_t feed_wdt_type;
uint32_t enable_reg;
uint32_t timeout_cfg_reg;
uint32_t timeleft_cfg_reg;
uint32_t hw_margin;
uint32_t feed_time;
uint32_t timer_accuracy;
union {
gpio_wdt_info_t gpio_wdt;
logic_wdt_info_t logic_wdt;
} wdt_config_mode;
uint8_t sysfs_index;
} rg_wdt_device_t;
#endif