Commit Graph

5 Commits

Author SHA1 Message Date
Andy Shevchenko 808c788187 leds: max5970: Add missing headers
Don't inherit headers "by chance" from others.
Include the needed ones explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231214184050.1272848-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-21 14:42:59 +00:00
Andy Shevchenko e7baa5b437 leds: max5970: Make use of dev_err_probe()
Simplify the error handling in probe function by switching from
dev_err() to dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231214184050.1272848-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-21 14:42:59 +00:00
Andy Shevchenko 6d63d05e26 leds: max5970: Make use of device properties
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Add mod_devicetable.h include.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231214184050.1272848-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-21 14:42:59 +00:00
Andy Shevchenko d3578b4982 leds: max5970: Remove unused variable
leds-max5970.c:50:21: warning: variable 'num_leds' set but not used [-Wunused-but-set-variable]

Remove unused variable.

Fixes: 736214b4b0 ("leds: max5970: Add support for max5970")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231214184050.1272848-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-21 14:42:59 +00:00
Patrick Rudolph 736214b4b0 leds: max5970: Add support for max5970
The MAX5970 is hot swap controller and has 4 indication LED.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20231123132803.1107174-1-naresh.solanki@9elements.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:41 +00:00