Skip to content

Commit e40dc66

Browse files
committed
Merge tag 'leds_for_4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents cc5ada7 + 92d7ec1 commit e40dc66

File tree

9 files changed

+342
-18
lines changed

9 files changed

+342
-18
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8988,6 +8988,7 @@ M: Vadim Pasternak <[email protected]>
89888988
89898989
S: Supported
89908990
F: drivers/leds/leds-mlxcpld.c
8991+
F: drivers/leds/leds-mlxreg.c
89918992
F: Documentation/leds/leds-mlxcpld.txt
89928993

89938994
MELLANOX PLATFORM DRIVER

drivers/ata/libata-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5240,7 +5240,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
52405240
struct ata_port *ap = qc->ap;
52415241

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

52455245
/* XXX: New EH and old EH use different mechanisms to
52465246
* synchronize EH with regular execution path.

drivers/ide/ide-disk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
187187
BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
188188
BUG_ON(blk_rq_is_passthrough(rq));
189189

190-
ledtrig_disk_activity();
190+
ledtrig_disk_activity(rq_data_dir(rq) == WRITE);
191191

192192
pr_debug("%s: %sing: block=%llu, sectors=%u\n",
193193
drive->name, rq_data_dir(rq) == READ ? "read" : "writ",

drivers/leds/Kconfig

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ config LEDS_APU
6969
module will be called leds-apu.
7070

7171
config LEDS_AS3645A
72-
tristate "AS3645A LED flash controller support"
72+
tristate "AS3645A and LM3555 LED flash controllers support"
7373
depends on I2C && LEDS_CLASS_FLASH
7474
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
7575
help
@@ -521,7 +521,7 @@ config LEDS_MC13783
521521
depends on LEDS_CLASS
522522
depends on MFD_MC13XXX
523523
help
524-
This option enable support for on-chip LED drivers found
524+
This option enables support for on-chip LED drivers found
525525
on Freescale Semiconductor MC13783/MC13892/MC34708 PMIC.
526526

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

@@ -594,12 +594,12 @@ config LEDS_MAX8997
594594
MAXIM MAX8997 PMIC.
595595

596596
config LEDS_LM355x
597-
tristate "LED support for LM355x Chips, LM3554 and LM3556"
597+
tristate "LED support for LM3554 and LM3556 chips"
598598
depends on LEDS_CLASS && I2C
599599
select REGMAP_I2C
600600
help
601-
This option enables support for LEDs connected to LM355x.
602-
LM355x includes Torch, Flash and Indicator functions.
601+
This option enables support for LEDs connected to LM3554
602+
and LM3556. It includes Torch, Flash and Indicator functions.
603603

604604
config LEDS_OT200
605605
tristate "LED support for the Bachmann OT200"
@@ -674,7 +674,7 @@ config LEDS_SYSCON
674674
depends on MFD_SYSCON
675675
depends on OF
676676
help
677-
This option enabled support for the LEDs on syscon type
677+
This option enables support for the LEDs on syscon type
678678
devices. This will only work with device tree enabled
679679
devices.
680680

@@ -688,11 +688,20 @@ config LEDS_PM8058
688688

689689
config LEDS_MLXCPLD
690690
tristate "LED support for the Mellanox boards"
691-
depends on X86_64 && DMI
691+
depends on X86 && DMI
692+
depends on LEDS_CLASS
693+
help
694+
This option enables support for the LEDs on the Mellanox
695+
boards. Say Y to enable these.
696+
697+
config LEDS_MLXREG
698+
tristate "LED support for the Mellanox switches management control"
692699
depends on LEDS_CLASS
693700
help
694-
This option enabled support for the LEDs on the Mellanox
695-
boards. Say Y to enabled these.
701+
This option enables support for the LEDs on the Mellanox Ethernet and
702+
InfiniBand switches. The driver can be activated by the platform device
703+
device add call. Say Y to enable these. To compile this driver as a
704+
module, choose 'M' here: the module will be called leds-mlxreg.
696705

697706
config LEDS_USER
698707
tristate "Userspace LED support"

drivers/leds/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o
7272
obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o
7373
obj-$(CONFIG_LEDS_PM8058) += leds-pm8058.o
7474
obj-$(CONFIG_LEDS_MLXCPLD) += leds-mlxcpld.o
75+
obj-$(CONFIG_LEDS_MLXREG) += leds-mlxreg.o
7576
obj-$(CONFIG_LEDS_NIC78BX) += leds-nic78bx.o
7677
obj-$(CONFIG_LEDS_MT6323) += leds-mt6323.o
7778
obj-$(CONFIG_LEDS_LM3692X) += leds-lm3692x.o

drivers/leds/leds-apu.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,30 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
110110
DMI_MATCH(DMI_PRODUCT_NAME, "APU")
111111
}
112112
},
113+
/* PC Engines APU2 with "Legacy" bios < 4.0.8 */
113114
{
114115
.ident = "apu2",
115116
.matches = {
116117
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
117118
DMI_MATCH(DMI_BOARD_NAME, "APU2")
118119
}
119120
},
121+
/* PC Engines APU2 with "Legacy" bios >= 4.0.8 */
122+
{
123+
.ident = "apu2",
124+
.matches = {
125+
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
126+
DMI_MATCH(DMI_BOARD_NAME, "apu2")
127+
}
128+
},
129+
/* PC Engines APU2 with "Mainline" bios */
130+
{
131+
.ident = "apu2",
132+
.matches = {
133+
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
134+
DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
135+
}
136+
},
120137
{}
121138
};
122139
MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
@@ -206,12 +223,14 @@ static int __init apu_led_probe(struct platform_device *pdev)
206223

207224
apu_led->pdev = pdev;
208225

209-
if (dmi_match(DMI_BOARD_NAME, "APU")) {
226+
if (dmi_match(DMI_PRODUCT_NAME, "APU")) {
210227
apu_led->profile = apu1_led_profile;
211228
apu_led->platform = APU1_LED_PLATFORM;
212229
apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
213230
apu_led->iosize = APU1_IOSIZE;
214-
} else if (dmi_match(DMI_BOARD_NAME, "APU2")) {
231+
} else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
232+
dmi_match(DMI_BOARD_NAME, "apu2") ||
233+
dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
215234
apu_led->profile = apu2_led_profile;
216235
apu_led->platform = APU2_LED_PLATFORM;
217236
apu_led->num_led_instances = ARRAY_SIZE(apu2_led_profile);
@@ -237,7 +256,10 @@ static int __init apu_led_init(void)
237256
pr_err("No PC Engines board detected\n");
238257
return -ENODEV;
239258
}
240-
if (!(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "APU2"))) {
259+
if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
260+
dmi_match(DMI_PRODUCT_NAME, "APU2") ||
261+
dmi_match(DMI_PRODUCT_NAME, "apu2") ||
262+
dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
241263
pr_err("Unknown PC Engines board: %s\n",
242264
dmi_get_system_info(DMI_PRODUCT_NAME));
243265
return -ENODEV;

0 commit comments

Comments
 (0)