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
20 lines
794 B
C
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_ */
|