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 _FPGA_SYSFS_H_
|
|
#define _FPGA_SYSFS_H_
|
|
|
|
struct s3ip_sysfs_fpga_drivers_s {
|
|
int (*get_main_board_fpga_number)(void);
|
|
ssize_t (*get_main_board_fpga_alias)(unsigned int fpga_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_fpga_type)(unsigned int fpga_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_fpga_firmware_version)(unsigned int fpga_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_fpga_board_version)(unsigned int fpga_index, char *buf, size_t count);
|
|
ssize_t (*get_main_board_fpga_test_reg)(unsigned int fpga_index, char *buf, size_t count);
|
|
int (*set_main_board_fpga_test_reg)(unsigned int fpga_index, unsigned int value);
|
|
};
|
|
|
|
extern int s3ip_sysfs_fpga_drivers_register(struct s3ip_sysfs_fpga_drivers_s *drv);
|
|
extern void s3ip_sysfs_fpga_drivers_unregister(void);
|
|
#endif /*_FPGA_SYSFS_H_ */
|