powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Aug 2015 23:33:55 +0000 (09:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 22 Aug 2015 11:09:12 +0000 (21:09 +1000)
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>
arch/powerpc/include/asm/opal-api.h
drivers/leds/leds-powernv.c

index b516ec1..9784c92 100644 (file)
@@ -343,6 +343,18 @@ enum OpalPciResetState {
        OPAL_ASSERT_RESET   = 1
 };
 
+enum OpalSlotLedType {
+       OPAL_SLOT_LED_TYPE_ID = 0,      /* IDENTIFY LED */
+       OPAL_SLOT_LED_TYPE_FAULT = 1,   /* FAULT LED */
+       OPAL_SLOT_LED_TYPE_ATTN = 2,    /* System Attention LED */
+       OPAL_SLOT_LED_TYPE_MAX = 3
+};
+
+enum OpalSlotLedState {
+       OPAL_SLOT_LED_STATE_OFF = 0,    /* LED is OFF */
+       OPAL_SLOT_LED_STATE_ON = 1      /* LED is ON */
+};
+
 /*
  * Address cycle types for LPC accesses. These also correspond
  * to the content of the first cell of the "reg" property for
index a2fea19..2c5c5b1 100644 (file)
@@ -27,9 +27,9 @@ struct led_type_map {
        const char      *desc;
 };
 static const struct led_type_map led_type_map[] = {
-       {OPAL_SLOT_LED_TYPE_ID,         POWERNV_LED_TYPE_IDENTIFY},
-       {OPAL_SLOT_LED_TYPE_FAULT,      POWERNV_LED_TYPE_FAULT},
-       {OPAL_SLOT_LED_TYPE_ATTN,       POWERNV_LED_TYPE_ATTENTION},
+       {OPAL_SLOT_LED_TYPE_ID,         "identify"},
+       {OPAL_SLOT_LED_TYPE_FAULT,      "fault"},
+       {OPAL_SLOT_LED_TYPE_ATTN,       "attention"},
        {-1,                            NULL},
 };