]> git.baikalelectronics.ru Git - kernel.git/commit
platform/mellanox: mlxreg-hotplug: Use capability register for attribute creation
authorVadim Pasternak <vadimp@mellanox.com>
Tue, 14 Jul 2020 12:01:56 +0000 (15:01 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 15 Jul 2020 09:45:07 +0000 (12:45 +0300)
commitf8d7dc63c70766eee52efa0a3bab103405846d9c
treed81323a6f4f8482e612a092780de507b263bc414
parent0d585e0001fd2bf2f59ac22ca3c54a8854769830
platform/mellanox: mlxreg-hotplug: Use capability register for attribute creation

Create the 'sysfs' attributes according to configuration provided
through the capability register, which purpose is to indicate the
actual number of the components within the particular group.
Such components could be, for example the FAN or power supply units.
The motivation is to avoid adding a new code in the future in order to
distinct between the systems types supporting a different number of the
components like power supplies, FANs, ASICs, line cards.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/mellanox/mlxreg-hotplug.c