Skip to content

Commit

Permalink
Merge tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/j.anaszewski/linux-leds

Pull LED updates from Jacek Anaszewski:
 "New LED class driver:
   - add driver for Mellanox regmap LEDs

  Improvement to ledtrig-disk:
   - extend disk trigger for reads and writes

  Improvements and fixes to existing LED class drivers:
   - add more product/board names for PC Engines APU2
   - fix wrong dmi_match on PC Engines APU LEDs
   - clarify chips supported by LM355x driver
   - fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG
   - allow leds-mlxcpld compilation for 32 bit arch"

* tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: Fix wrong dmi_match on PC Engines APU LEDs
  leds: Extends disk trigger for reads and writes
  leds: Add more product/board names for PC Engines APU2
  leds: add driver for support Mellanox regmap LEDs for BMC and x86 platform
  leds: fix Kconfig text for MLXCPLD, SYSCON, MC13783, NETXBIG
  leds: Clarify supported chips by LM355x driver
  leds: leds-mlxcpld: Allow compilation for 32 bit arch
  • Loading branch information
Linus Torvalds committed Apr 3, 2018
2 parents cc5ada7 + 92d7ec1 commit e40dc66
Show file tree
Hide file tree
Showing 9 changed files with 342 additions and 18 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8988,6 +8988,7 @@ M: Vadim Pasternak <vadimp@mellanox.com>
L: linux-leds@vger.kernel.org
S: Supported
F: drivers/leds/leds-mlxcpld.c
F: drivers/leds/leds-mlxreg.c
F: Documentation/leds/leds-mlxcpld.txt

MELLANOX PLATFORM DRIVER
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5240,7 +5240,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap;

/* Trigger the LED (if available) */
ledtrig_disk_activity();
ledtrig_disk_activity(!!(qc->tf.flags & ATA_TFLAG_WRITE));

/* XXX: New EH and old EH use different mechanisms to
* synchronize EH with regular execution path.
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
BUG_ON(blk_rq_is_passthrough(rq));

ledtrig_disk_activity();
ledtrig_disk_activity(rq_data_dir(rq) == WRITE);

pr_debug("%s: %sing: block=%llu, sectors=%u\n",
drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
Expand Down
29 changes: 19 additions & 10 deletions drivers/leds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ config LEDS_APU
module will be called leds-apu.

config LEDS_AS3645A
tristate "AS3645A LED flash controller support"
tristate "AS3645A and LM3555 LED flash controllers support"
depends on I2C && LEDS_CLASS_FLASH
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
help
Expand Down Expand Up @@ -521,7 +521,7 @@ config LEDS_MC13783
depends on LEDS_CLASS
depends on MFD_MC13XXX
help
This option enable support for on-chip LED drivers found
This option enables support for on-chip LED drivers found
on Freescale Semiconductor MC13783/MC13892/MC34708 PMIC.

config LEDS_NS2
Expand All @@ -544,7 +544,7 @@ config LEDS_NETXBIG
depends on MACH_KIRKWOOD
default y
help
This option enable support for LEDs found on the LaCie 2Big
This option enables support for LEDs found on the LaCie 2Big
and 5Big Network v2 boards. The LEDs are wired to a CPLD and are
controlled through a GPIO extension bus.

Expand Down Expand Up @@ -594,12 +594,12 @@ config LEDS_MAX8997
MAXIM MAX8997 PMIC.

config LEDS_LM355x
tristate "LED support for LM355x Chips, LM3554 and LM3556"
tristate "LED support for LM3554 and LM3556 chips"
depends on LEDS_CLASS && I2C
select REGMAP_I2C
help
This option enables support for LEDs connected to LM355x.
LM355x includes Torch, Flash and Indicator functions.
This option enables support for LEDs connected to LM3554
and LM3556. It includes Torch, Flash and Indicator functions.

config LEDS_OT200
tristate "LED support for the Bachmann OT200"
Expand Down Expand Up @@ -674,7 +674,7 @@ config LEDS_SYSCON
depends on MFD_SYSCON
depends on OF
help
This option enabled support for the LEDs on syscon type
This option enables support for the LEDs on syscon type
devices. This will only work with device tree enabled
devices.

Expand All @@ -688,11 +688,20 @@ config LEDS_PM8058

config LEDS_MLXCPLD
tristate "LED support for the Mellanox boards"
depends on X86_64 && DMI
depends on X86 && DMI
depends on LEDS_CLASS
help
This option enables support for the LEDs on the Mellanox
boards. Say Y to enable these.

config LEDS_MLXREG
tristate "LED support for the Mellanox switches management control"
depends on LEDS_CLASS
help
This option enabled support for the LEDs on the Mellanox
boards. Say Y to enabled these.
This option enables support for the LEDs on the Mellanox Ethernet and
InfiniBand switches. The driver can be activated by the platform device
device add call. Say Y to enable these. To compile this driver as a
module, choose 'M' here: the module will be called leds-mlxreg.

config LEDS_USER
tristate "Userspace LED support"
Expand Down
1 change: 1 addition & 0 deletions drivers/leds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o
obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o
obj-$(CONFIG_LEDS_PM8058) += leds-pm8058.o
obj-$(CONFIG_LEDS_MLXCPLD) += leds-mlxcpld.o
obj-$(CONFIG_LEDS_MLXREG) += leds-mlxreg.o
obj-$(CONFIG_LEDS_NIC78BX) += leds-nic78bx.o
obj-$(CONFIG_LEDS_MT6323) += leds-mt6323.o
obj-$(CONFIG_LEDS_LM3692X) += leds-lm3692x.o
Expand Down
28 changes: 25 additions & 3 deletions drivers/leds/leds-apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,30 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "APU")
}
},
/* PC Engines APU2 with "Legacy" bios < 4.0.8 */
{
.ident = "apu2",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
DMI_MATCH(DMI_BOARD_NAME, "APU2")
}
},
/* PC Engines APU2 with "Legacy" bios >= 4.0.8 */
{
.ident = "apu2",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
DMI_MATCH(DMI_BOARD_NAME, "apu2")
}
},
/* PC Engines APU2 with "Mainline" bios */
{
.ident = "apu2",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
}
},
{}
};
MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
Expand Down Expand Up @@ -206,12 +223,14 @@ static int __init apu_led_probe(struct platform_device *pdev)

apu_led->pdev = pdev;

if (dmi_match(DMI_BOARD_NAME, "APU")) {
if (dmi_match(DMI_PRODUCT_NAME, "APU")) {
apu_led->profile = apu1_led_profile;
apu_led->platform = APU1_LED_PLATFORM;
apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
apu_led->iosize = APU1_IOSIZE;
} else if (dmi_match(DMI_BOARD_NAME, "APU2")) {
} else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
dmi_match(DMI_BOARD_NAME, "apu2") ||
dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
apu_led->profile = apu2_led_profile;
apu_led->platform = APU2_LED_PLATFORM;
apu_led->num_led_instances = ARRAY_SIZE(apu2_led_profile);
Expand All @@ -237,7 +256,10 @@ static int __init apu_led_init(void)
pr_err("No PC Engines board detected\n");
return -ENODEV;
}
if (!(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "APU2"))) {
if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
dmi_match(DMI_PRODUCT_NAME, "APU2") ||
dmi_match(DMI_PRODUCT_NAME, "apu2") ||
dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
pr_err("Unknown PC Engines board: %s\n",
dmi_get_system_info(DMI_PRODUCT_NAME));
return -ENODEV;
Expand Down
Loading

0 comments on commit e40dc66

Please sign in to comment.