sonic-buildimage/platform/s3ip-sysfs/s3ip_sysfs_frame/include/syseeprom_sysfs.h
tianshangfei 8fe4fab89f
The slot and switch_rootsysfs driver framework module complies with s3ip sysfs specification (#12893)
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
2022-12-14 22:34:27 +08:00

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_ */