From 962fea431269164903a88f65f32d7fee8e82976f Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 2 Sep 2003 20:14:16 -0700 Subject: [PATCH] [PATCH] ide: enable LED support for PowerMac From Benjamin Herrenschmidt : This adds the Kconfig option for the PowerMac IDE driver "LED" feature (using the laptop's front LED as a disk activity indicator). It also adds a small bit to ide-probe.c that was missing from Jens patch when he added the activity function infrastructure. He did add the hwif field, but not the code to actually enable it. --- drivers/ide/Kconfig | 7 +++++++ drivers/ide/ide-probe.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 17f00f61c3ac8..1dcd06f981448 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -835,6 +835,13 @@ config BLK_DEV_IDEDMA_PMAC to transfer data to and from memory. Saying Y is safe and improves performance. +config BLK_DEV_IDE_PMAC_BLINK + bool "Blink laptop LED on drive activity" + depends on BLK_DEV_IDE_PMAC && ADB_PMU + help + This option enables the use of the sleep LED as a hard drive + activity LED. + config BLK_DEV_IDEDMA_PMAC_AUTO bool "Use DMA by default" depends on BLK_DEV_IDEDMA_PMAC diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index cb18ac6fa2b75..ef80249cda495 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -958,6 +958,10 @@ static int ide_init_queue(ide_drive_t *drive) /* needs drive->queue to be set */ ide_toggle_bounce(drive, 1); + /* enable led activity for disk drives only */ + if (drive->media == ide_disk && hwif->led_act) + blk_queue_activity_fn(q, hwif->led_act, drive); + return 0; } -- 2.53.0