8f124dc56d
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
17 lines
671 B
C
Executable File
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_ */
|