8fe4fab89f
Why I did it Provide slot and switch_rootsysfs 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
13 lines
476 B
C
13 lines
476 B
C
#ifndef _SYSEEPROM_SYSFS_H_
|
|
#define _SYSEEPROM_SYSFS_H_
|
|
|
|
struct s3ip_sysfs_syseeprom_drivers_s {
|
|
int (*get_syseeprom_size)(void);
|
|
ssize_t (*read_syseeprom_data)(char *buf, loff_t offset, size_t count);
|
|
ssize_t (*write_syseeprom_data)(char *buf, loff_t offset, size_t count);
|
|
};
|
|
|
|
extern int s3ip_sysfs_syseeprom_drivers_register(struct s3ip_sysfs_syseeprom_drivers_s *drv);
|
|
extern void s3ip_sysfs_syseeprom_drivers_unregister(void);
|
|
#endif /*_SYSEEPROM_SYSFS_H_ */
|