0

I'm writing a linux driver for a custom RF board. The RF board have an EEPROM contain some information and I want to load this information to my driver. Linux kernel already has EEPROM module, this module read all memory of the EEPROM and export to userspace by sysfs.

Can I read this sysfs to get EEPROM's memory? If not, how can I get this information? Thank you.

Gochit
  • 113
  • 1
  • 2
  • 6
  • 1
    Yes, you can. Just find the proper device node under `/sys/bus//devices//eeprom`. – 0andriy Jan 13 '17 at 18:25
  • I can't find any documents to read files from linux kernel module, some forum recommend don't do this. And how to config proper device node in device tree? Please help me, thank you :) – Gochit Jan 15 '17 at 16:33

1 Answers1

0

There are userspace applications which read the data exported by the eeprom module. So if you know Perl a bit, I suggest that you will consider looking at the following i2c-tools link: https://github.com/groeck/i2c-tools/tree/master/eeprom

Rami Rosen

Rami Rosen
  • 330
  • 2
  • 2