Feat/i2c write
Created by: AndreasGeissler
Hello,
I would like to introduce a new version of the 13Z077-90 native driver:
This version was created to enable access to the bit-banging I2C interface of the FPGA and to provide read and write functions for a connected EEPROM with a MAC address. This functionality was copied from the windows driver and adapted for Linux.
To access the I2C a sysfs note will be created by the driver called z77_eeprod_mac. This note can be found at: /sys/class/net/<interface name>/z77_eeprod_mac
In addition a new module parameter was added to select if the sysfs note is created or not, to prevent a customer from accidentally changing the MAC address:
maceepromacc
- 0 no sysfs note will be created
- !=0 create sysfs note z77_eeprod_mac to access EEPROM attached to FPGA
Usage: To create the sysfs note load the driver as followed: # modprobe men_lx_z77 maceepromacc=1
To read the MAC address : # sudo cat /sys/class/net/<interface name>/z77_eeprod_mac
To write the MAC address : # sudo sh -c 'echo -n <MAC address> > /sys/class/net/<interface name>/z77_eeprod_mac'
The MAC address must have the following format: "12:34:56:78:9a:bc"
Before adding these changes, please check the diff, make a code review and perform a full functional test of the 13Z077-90. This driver is used in many projects and the new driver version has not been tested completely yet.
Any remarks, wishes or questions are welcome
Regards, Andreas