a2885b31ed
Why I did it Provide CPLD and FPGA 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
863 B
C
17 lines
863 B
C
#ifndef _CPLD_SYSFS_H_
|
|
#define _CPLD_SYSFS_H_
|
|
|
|
struct s3ip_sysfs_cpld_drivers_s {
|
|
int (*get_main_board_cpld_number)(void);
|
|
ssize_t (*get_main_board_cpld_alias)(unsigned int cpld_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_cpld_type)(unsigned int cpld_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_cpld_firmware_version)(unsigned int cpld_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_cpld_board_version)(unsigned int cpld_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_cpld_test_reg)(unsigned int cpld_index, char *buf, size_t count);
|
|
int (*set_main_board_cpld_test_reg)(unsigned int cpld_index, unsigned int value);
|
|
};
|
|
|
|
extern int s3ip_sysfs_cpld_drivers_register(struct s3ip_sysfs_cpld_drivers_s *drv);
|
|
extern void s3ip_sysfs_cpld_drivers_unregister(void);
|
|
#endif /*_CPLD_SYSFS_H_ */
|