summaryrefslogtreecommitdiffstats
path: root/drivers/misc/eeprom/Kconfig
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2017-01-13 15:16:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 11:39:57 +0100
commitcfad6425382ec81acd073fdf24361e1c30b4cb36 (patch)
tree4cdf265f4b8973108de7e332716809f1c93c9cc3 /drivers/misc/eeprom/Kconfig
parent8e8e333179d6ea50fd0491b138e71dc9d98378ba (diff)
eeprom: Add IDT 89HPESx EEPROM/CSR driver
This driver provides an access to EEPROM of IDT PCIe-switches. IDT PCIe- switches expose a simple SMBus interface to perform IO-operations from/to EEPROM, which is located at private (so called Master) SMBus. The driver creates a simple binary sysfs-file to have an access to the EEPROM using the SMBus-slave interface in the i2c-device susfs-directory: /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom In case if read-only flag is specified at dts-node of the device, User-space applications won't be able to write to the EEPROM sysfs-node. Additionally IDT 89HPESx SMBus interface has an ability to read/write values of device CSRs. This driver exposes debugfs-file to perform simple IO-operations using that ability for just basic debug purpose. Particularly the next file is created in the specific debugfs-directory: /sys/kernel/debug/idt_csr/ Format of the debugfs-file value is: $ cat /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>; <CSR address>:<CSR value> So reading the content of the file gives current CSR address and it value. If User-space application wishes to change current CSR address, it can just write a proper value to the sysfs-file: $ echo "<CSR address>" > /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname> If it wants to change the CSR value as well, the format of the write operation is: $ echo "<CSR address>:<CSR value>" > \ /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>; CSR address and value can be any of hexadecimal, decimal or octal format. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom/Kconfig')
-rw-r--r--drivers/misc/eeprom/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
index c4e41c26649e..de58762097c4 100644
--- a/drivers/misc/eeprom/Kconfig
+++ b/drivers/misc/eeprom/Kconfig
@@ -100,4 +100,14 @@ config EEPROM_DIGSY_MTC_CFG
If unsure, say N.
+config EEPROM_IDT_89HPESX
+ tristate "IDT 89HPESx PCIe-swtiches EEPROM / CSR support"
+ depends on I2C && SYSFS
+ help
+ Enable this driver to get read/write access to EEPROM / CSRs
+ over IDT PCIe-swtich i2c-slave interface.
+
+ This driver can also be built as a module. If so, the module
+ will be called idt_89hpesx.
+
endmenu