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)
commit0a43f7be57edbe9fac6084a6f92694a3badee827
treed81323a6f4f8482e612a092780de507b263bc414
parent5272d4e9c0946037862452b07887ebc81d82591c
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