From be4fdf99fa4dc95aa01144b207caf2cc9fa074d8 Mon Sep 17 00:00:00 2001 From: Vadim Pasternak Date: Thu, 8 Sep 2016 07:25:53 +0000 Subject: leds: add driver for Mellanox systems LEDs This makes it possible to create a set of LEDs for Mellanox systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100". Driver obtains LED devices according to system configuration, provided through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and creates devices in form: "devicename:colour:function". LED setting is controlled through on board CPLD Lattice device. For setting particular LED off, solid, blink: echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger On module probing all LEDs are set green, on removing - off. Last setting overwrites previous, f.e. sequence for changing LED from green - red - green: echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness Note: LEDs cannot be turned on/off simultaneously. The Kconfig currently controlling compilation of this code is: drivers/leds/Kconfig:config LEDS_MLXCPLD Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Reviewed-by: Wei Yongjun Signed-off-by: Jacek Anaszewski --- drivers/leds/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/leds/Kconfig') diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 969c720dfd10..7a628c6516f6 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -651,6 +651,14 @@ config LEDS_PM8058 Choose this option if you want to use the LED drivers in the Qualcomm PM8058 PMIC. +config LEDS_MLXCPLD + tristate "LED support for the Mellanox boards" + depends on X86_64 && DMI + depends on LEDS_CLASS + help + This option enabled support for the LEDs on the Mellanox + boards. Say Y to enabled these. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig" -- cgit v1.2.3