Messages in this thread | | | Date | Mon, 20 Feb 2023 10:45:11 +0100 | From | Greg KH <> | Subject | Re: [PATCH v5 char-misc-next] misc: microchip: pci1xxxx: Add OTP/EEPROM driver for the pci1xxxx switch |
| |
On Mon, Feb 20, 2023 at 09:31:45AM +0000, Kumaravel.Thiagarajan@microchip.com wrote: > > I do not recommend using a block interface for this at all. Why not > > the > > "normal" EEPROM interface that the kernel has today (i.e. a binary > > sysfs > > file)? That way you can mmap it and edit locations how ever you > > want. > Greg, I have one question about the sysfs interface. If OTP and EEPROM > are enumerated as two sysfs files of 8KB each, will that start > occupying the RAM permamently or is the swapping in and out of the RAM > handled automatically by the kernel based on the user trying to access > it.
It depends on exactly what you are doing here with the binary sysfs file. Try it yourself and see how it works.
thanks,
greg k-h
| |