diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-21 19:33:55 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-22 07:09:12 -0400 |
commit | 5d53be7d8c7ccf8eec1ce66c6b3573c01d16b755 (patch) | |
tree | 0976fb382b1cda4158129a37716ea8d0a16d45f8 | |
parent | e72bb8a5a884d022231149d407653923a1d79e53 (diff) |
powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver
When I merged the OPAL support for the powernv LEDS driver I missed a
hunk.
This is slightly modified from the original patch, as the original added
code to opal-api.h which is not in the skiboot version, which is
discouraged.
Instead those values are moved into the driver, which is the only place
they are used.
Fixes: 8a8d91817aec ("powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states")
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/include/asm/opal-api.h | 12 | ||||
-rw-r--r-- | drivers/leds/leds-powernv.c | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h index b516ec1d3b4c..9784c9241c70 100644 --- a/arch/powerpc/include/asm/opal-api.h +++ b/arch/powerpc/include/asm/opal-api.h | |||
@@ -343,6 +343,18 @@ enum OpalPciResetState { | |||
343 | OPAL_ASSERT_RESET = 1 | 343 | OPAL_ASSERT_RESET = 1 |
344 | }; | 344 | }; |
345 | 345 | ||
346 | enum OpalSlotLedType { | ||
347 | OPAL_SLOT_LED_TYPE_ID = 0, /* IDENTIFY LED */ | ||
348 | OPAL_SLOT_LED_TYPE_FAULT = 1, /* FAULT LED */ | ||
349 | OPAL_SLOT_LED_TYPE_ATTN = 2, /* System Attention LED */ | ||
350 | OPAL_SLOT_LED_TYPE_MAX = 3 | ||
351 | }; | ||
352 | |||
353 | enum OpalSlotLedState { | ||
354 | OPAL_SLOT_LED_STATE_OFF = 0, /* LED is OFF */ | ||
355 | OPAL_SLOT_LED_STATE_ON = 1 /* LED is ON */ | ||
356 | }; | ||
357 | |||
346 | /* | 358 | /* |
347 | * Address cycle types for LPC accesses. These also correspond | 359 | * Address cycle types for LPC accesses. These also correspond |
348 | * to the content of the first cell of the "reg" property for | 360 | * to the content of the first cell of the "reg" property for |
diff --git a/drivers/leds/leds-powernv.c b/drivers/leds/leds-powernv.c index a2fea192573b..2c5c5b12ab64 100644 --- a/drivers/leds/leds-powernv.c +++ b/drivers/leds/leds-powernv.c | |||
@@ -27,9 +27,9 @@ struct led_type_map { | |||
27 | const char *desc; | 27 | const char *desc; |
28 | }; | 28 | }; |
29 | static const struct led_type_map led_type_map[] = { | 29 | static const struct led_type_map led_type_map[] = { |
30 | {OPAL_SLOT_LED_TYPE_ID, POWERNV_LED_TYPE_IDENTIFY}, | 30 | {OPAL_SLOT_LED_TYPE_ID, "identify"}, |
31 | {OPAL_SLOT_LED_TYPE_FAULT, POWERNV_LED_TYPE_FAULT}, | 31 | {OPAL_SLOT_LED_TYPE_FAULT, "fault"}, |
32 | {OPAL_SLOT_LED_TYPE_ATTN, POWERNV_LED_TYPE_ATTENTION}, | 32 | {OPAL_SLOT_LED_TYPE_ATTN, "attention"}, |
33 | {-1, NULL}, | 33 | {-1, NULL}, |
34 | }; | 34 | }; |
35 | 35 | ||