sonic-buildimage/platform/s3ip-sysfs/s3ip_sysfs_frame/include/sysled_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

20 lines
794 B
C

#ifndef _SYSLED_SYSFS_H_
#define _SYSLED_SYSFS_H_
struct s3ip_sysfs_sysled_drivers_s {
ssize_t (*get_sys_led_status)(char *buf, size_t count);
int (*set_sys_led_status)(int status);
ssize_t (*get_bmc_led_status)(char *buf, size_t count);
int (*set_bmc_led_status)(int status);
ssize_t (*get_sys_fan_led_status)(char *buf, size_t count);
int (*set_sys_fan_led_status)(int status);
ssize_t (*get_sys_psu_led_status)(char *buf, size_t count);
int (*set_sys_psu_led_status)(int status);
ssize_t (*get_id_led_status)(char *buf, size_t count);
int (*set_id_led_status)(int status);
};
extern int s3ip_sysfs_sysled_drivers_register(struct s3ip_sysfs_sysled_drivers_s *drv);
extern void s3ip_sysfs_sysled_drivers_unregister(void);
#endif /*_SYSLED_SYSFS_H_ */