Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 490e1422 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Jacek Anaszewski:
 "In this merge cycle we had an interaction with MTD subsystem, that
  included converting drivers/mtd/nand/nand_base.c to use newly
  introduced MTD (NAND/NOR) LED trigger instead of implementing it on
  its own.

  Related MTD patches are intended to be merged through the LED tree,
  before MTD tree is merged, since further MTD development is based on
  those modifications.

  Summary:

  LEDs:
   - Introduce a kernel panic LED trigger

   - Introduce a MTD (NAND/NOR) trigger

   - led-tca6507: silence an uninitialized variable warning

   - ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity()

   - leds-ss4200: Add depend on x86 arch

   - leds-ss4200: add DMI data for FSC SCALEO Home Server

   - leds-triggers: Allow to switch the trigger to "panic" on a kernel panic

   - devicetree: leds: Introduce "panic-indicator" optional property

   - leds-gpio: Support the "panic-indicator" firmware property

  MTD:
   - Uninline mtd_write_oob and move it to mtdcore.c

   - Remove the "nand-disk" LED trigger

   - Hook I/O activity to the MTD LED trigger"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: gpio: Support the "panic-indicator" firmware property
  devicetree: leds: Introduce "panic-indicator" optional property
  leds: triggers: Allow to switch the trigger to "panic" on a kernel panic
  leds: ss4200: add DMI data for FSC SCALEO Home Server
  leds: ss4200: Add depend on x86 arch
  leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity()
  leds: tca6507: silence an uninitialized variable warning
  mtd: Hook I/O activity to the MTD LED trigger
  mtd: nand: Remove the "nand-disk" LED trigger
  leds: trigger: Introduce a MTD (NAND/NOR) trigger
  mtd: Uninline mtd_write_oob and move it to mtdcore.c
  leds: trigger: Introduce a kernel panic LED trigger
parents b6ae4055 80d6737b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ Optional properties for child nodes:
                     property is mandatory for the LEDs in the non-flash modes
                     (e.g. torch or indicator).

- panic-indicator : This property specifies that the LED should be used,
		    if at all possible, as a panic indicator.

Required properties for flash LED child nodes:
- flash-max-microamp : Maximum flash LED supply current in microamperes.
- flash-max-timeout-us : Maximum timeout in microseconds after which the flash
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ LED sub-node properties:
  property is not present.
- retain-state-suspended: (optional) The suspend state can be retained.Such
  as charge-led gpio.
- panic-indicator : (optional)
  see Documentation/devicetree/bindings/leds/common.txt

Examples:

+3 −2
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ config LEDS_INTEL_SS4200
	tristate "LED driver for Intel NAS SS4200 series"
	depends on LEDS_CLASS
	depends on PCI && DMI
	depends on X86
	help
	  This option enables support for the Intel SS4200 series of
	  Network Attached Storage servers. You may control the hard
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
 * Nests outside led_cdev->trigger_lock
 */
static DECLARE_RWSEM(triggers_list_lock);
static LIST_HEAD(trigger_list);
LIST_HEAD(trigger_list);

 /* Used by LED Class */

+4 −0
Original line number Diff line number Diff line
@@ -127,6 +127,8 @@ static int create_gpio_led(const struct gpio_led *template,
	led_dat->cdev.brightness = state ? LED_FULL : LED_OFF;
	if (!template->retain_state_suspended)
		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
	if (template->panic_indicator)
		led_dat->cdev.flags |= LED_PANIC_INDICATOR;

	ret = gpiod_direction_output(led_dat->gpiod, state);
	if (ret < 0)
@@ -200,6 +202,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)

		if (fwnode_property_present(child, "retain-state-suspended"))
			led.retain_state_suspended = 1;
		if (fwnode_property_present(child, "panic-indicator"))
			led.panic_indicator = 1;

		ret = create_gpio_led(&led, &priv->leds[priv->num_leds],
				      dev, NULL);
Loading