]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/bcm/led_control.h
Merge tag 'ktest-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[karo-tx-linux.git] / drivers / staging / bcm / led_control.h
index 3eef21c80ba19347502d57699fa9b8053e4cd3c6..bae40e22e11bf30951d245fc5e5159f1da567fc8 100644 (file)
 #define MAX_FILE_NAME_BUFFER_SIZE              100
 
 #define TURN_ON_LED(GPIO, index) do {                                  \
-               UINT gpio_val = GPIO;                                   \
+               unsigned int gpio_val = GPIO;                                   \
                (Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ?   \
                        wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
                        wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)); \
-       } while (0);
+       } while (0)
 
 #define TURN_OFF_LED(GPIO, index)  do {                                        \
-               UINT gpio_val = GPIO;                                   \
+               unsigned int gpio_val = GPIO;                                   \
                (Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ?   \
                        wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
                        wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)); \
-       } while (0);
+       } while (0)
 
-#define B_ULONG32 unsigned long
-
-typedef enum _LEDColors {
+enum bcm_led_colors {
        RED_LED         = 1,
        BLUE_LED        = 2,
        YELLOW_LED      = 3,
        GREEN_LED       = 4
-} LEDColors; /* Enumerated values of different LED types */
+};
 
-typedef enum LedEvents {
+enum bcm_led_events {
        SHUTDOWN_EXIT           = 0x00,
        DRIVER_INIT             = 0x1,
        FW_DOWNLOAD             = 0x2,
@@ -53,31 +51,30 @@ typedef enum LedEvents {
        LED_THREAD_INACTIVE     = 0x100,  /* Makes the LED thread Inactivce. It wil be equivallent to putting the thread on hold. */
        LED_THREAD_ACTIVE       = 0x200,  /* Makes the LED Thread Active back. */
        DRIVER_HALT             = 0xff
-} LedEventInfo_t; /* Enumerated values of different driver states */
+}; /* Enumerated values of different driver states */
 
 /*
  * Structure which stores the information of different LED types
  * and corresponding LED state information of driver states
  */
-typedef struct LedStateInfo_t {
-       UCHAR LED_Type; /* specify GPIO number - use 0xFF if not used */
-       UCHAR LED_On_State; /* Bits set or reset for different states */
-       UCHAR LED_Blink_State; /* Bits set or reset for blinking LEDs for different states */
-       UCHAR GPIO_Num;
-       UCHAR BitPolarity; /* To represent whether H/W is normal polarity or reverse polarity */
-} LEDStateInfo, *pLEDStateInfo;
+struct bcm_led_state_info {
+       unsigned char LED_Type; /* specify GPIO number - use 0xFF if not used */
+       unsigned char LED_On_State; /* Bits set or reset for different states */
+       unsigned char LED_Blink_State; /* Bits set or reset for blinking LEDs for different states */
+       unsigned char GPIO_Num;
+       unsigned char BitPolarity; /* To represent whether H/W is normal polarity or reverse polarity */
+};
 
-typedef struct _LED_INFO_STRUCT {
-       LEDStateInfo    LEDState[NUM_OF_LEDS];
-       BOOLEAN         bIdleMode_tx_from_host; /* Variable to notify whether driver came out from idlemode due to Host or target */
-       BOOLEAN         bIdle_led_off;
+struct bcm_led_info {
+       struct bcm_led_state_info LEDState[NUM_OF_LEDS];
+       bool            bIdleMode_tx_from_host; /* Variable to notify whether driver came out from idlemode due to Host or target */
+       bool            bIdle_led_off;
        wait_queue_head_t       notify_led_event;
        wait_queue_head_t       idleModeSyncEvent;
        struct task_struct      *led_cntrl_threadid;
        int             led_thread_running;
-       BOOLEAN         bLedInitDone;
-
-} LED_INFO_STRUCT, *PLED_INFO_STRUCT;
+       bool            bLedInitDone;
+};
 
 /* LED Thread state. */
 #define BCM_LED_THREAD_DISABLED                0   /* LED Thread is not running. */