platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration
authorVadim Pasternak <vadimp@nvidia.com>
Wed, 8 Feb 2023 06:33:26 +0000 (08:33 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Feb 2023 11:07:50 +0000 (12:07 +0100)
commit26e118ea98cf5ec0b53198e643d5fa8d99b73b49
tree0032f53f2edcee55e08dc2923b7ee516a42220cc
parent233fd7e44cd7363ede8025619291b98475024c30
platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration

Currently hotplug configuration in logic device assumes that all items
are provided with no holes.
Thus, any group of hotplug events, associated with the specific
status/event/mask registers is configured in those registers
successively from bit zero to bit #n (#n < 8).

This logic is changed int order to allow non-successive definition to
support configuration with the skipped bits – for example bits 3, 5, 7
in status/event/mask registers can be associated with hotplug events,
while others can be skipped.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20230208063331.15560-10-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxreg-hotplug.c