]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
leds: mlxreg: Add support for capability register
authorVadim Pasternak <vadimp@mellanox.com>
Tue, 19 Feb 2019 11:33:29 +0000 (11:33 +0000)
committerDarren Hart (VMware) <dvhart@infradead.org>
Sat, 23 Feb 2019 17:20:46 +0000 (09:20 -0800)
commit530451d0df203e9603175db772941011450136f8
treed402ffe4722f813a17041db234a9212ee0a38946
parente4c275f77624961b56cce397814d9d770a45ac59
leds: mlxreg: Add support for capability register

Add support for capability register in order to distinct between the
systems with minor LED configuration differences. It reduces the amount
of code describing systems' LED configuration.
For example one system can be equipped with six LED, while the other
with only four. Reading this information from the capability registers
allows to use the same LED structure for such systems and set the
relevant configuration dynamically based on capability register
content.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/leds/leds-mlxreg.c