On Sun, May 27, 2018 at 04:47:43PM +0000, Vadim Pasternak wrote: > Introduce new Mellanox platform driver to allow access to Mellanox > programmable device register space trough sysfs interface. > The driver purpose is to provide sysfs interface for user space for the > registers essential for system control and monitoring. > The sets of registers for sysfs access are supposed to be defined per > system type bases and include the registers related to system resets > operation, system reset causes monitoring and some kinds of mux selection. > > Signed-off-by: Vadim Pasternak <vadimp@xxxxxxxxxxxx> > --- > v1->v2: > Changed added by Vadim: > - Change ---help--- to help in Kconfig, according to new requirements; > v2->v3: > Comments pointed out by Darren: > - Remove conditional assignment per attribute mode type, because mode > will guard against not permitted access. > Verified by Vadim. > --- > drivers/platform/mellanox/Kconfig | 11 ++ > drivers/platform/mellanox/Makefile | 1 + > drivers/platform/mellanox/mlxreg-io.c | 203 ++++++++++++++++++++++++++++++++++ > 3 files changed, 215 insertions(+) > create mode 100644 drivers/platform/mellanox/mlxreg-io.c > > diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig > index 591bccd..ddfae9fc 100644 > --- a/drivers/platform/mellanox/Kconfig > +++ b/drivers/platform/mellanox/Kconfig > @@ -23,4 +23,15 @@ config MLXREG_HOTPLUG > This driver handles hot-plug events for the power suppliers, power > cables and fans on the wide range Mellanox IB and Ethernet systems. > > +config MLXREG_IO > + tristate "Mellanox platform register access driver support" > + depends on REGMAP > + depends on HWMON > + help > + This driver allows access to Mellanox programmable device register > + space trough sysfs interface. The sets of registers for sysfs access > + are defined per system type bases and includes the registers related > + to system resets operation, system reset causes monitoring and some > + kinds of mux selection. No Documentation/ABI/ entries for these new sysfs files? Not good :( greg k-h