• Vadim Pasternak's avatar
    leds: add driver for Mellanox systems LEDs · be4fdf99
    Vadim Pasternak authored
    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: default avatarVadim Pasternak <vadimp@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
    Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
    be4fdf99
MAINTAINERS 363 KB