sonic-buildimage/platform/s3ip-sysfs/s3ip_sysfs_frame/include/watchdog_sysfs.h
tianshangfei 8f124dc56d
The LED and watchdog driver framework module complies with s3ip sysfs specification (#12892)
Why I did it
Provide SYSLED and watchdog driver framework that complies with s3ip sysfs specification

How I did it
1、 The framework module provides register and unregister interface and implementation.
2、 The framework will help you create the sysfs node

How to verify it
A demo driver base on this framework will display the sysfs node wich conform to the s3ip sysfs specification
2022-12-14 22:33:52 +08:00

17 lines
671 B
C
Executable File

#ifndef _WATCHDOG_SYSFS_H_
#define _WATCHDOG_SYSFS_H_
struct s3ip_sysfs_watchdog_drivers_s {
ssize_t (*get_watchdog_identify)(char *buf, size_t count);
ssize_t (*get_watchdog_timeleft)(char *buf, size_t count);
ssize_t (*get_watchdog_timeout)(char *buf, size_t count);
int (*set_watchdog_timeout)(int value);
ssize_t (*get_watchdog_enable_status)(char *buf, size_t count);
int (*set_watchdog_enable_status)(int value);
int (*set_watchdog_reset)(int value);
};
extern int s3ip_sysfs_watchdog_drivers_register(struct s3ip_sysfs_watchdog_drivers_s *drv);
extern void s3ip_sysfs_watchdog_drivers_unregister(void);
#endif /*_WATCHDOG_SYSFS_H_ */