Staging: bcm: Fix all white space issues in led_control.h
This patch fixes all white space issues in led_control.h as reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9d4cf71fbd
commit
67c6603827
|
@ -2,70 +2,60 @@
|
||||||
#define _LED_CONTROL_H
|
#define _LED_CONTROL_H
|
||||||
|
|
||||||
/*************************TYPE DEF**********************/
|
/*************************TYPE DEF**********************/
|
||||||
#define NUM_OF_LEDS 4
|
#define NUM_OF_LEDS 4
|
||||||
|
|
||||||
#define DSD_START_OFFSET 0x0200
|
#define DSD_START_OFFSET 0x0200
|
||||||
#define EEPROM_VERSION_OFFSET 0x020E
|
#define EEPROM_VERSION_OFFSET 0x020E
|
||||||
#define EEPROM_HW_PARAM_POINTER_ADDRESS 0x0218
|
#define EEPROM_HW_PARAM_POINTER_ADDRESS 0x0218
|
||||||
#define EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5 0x0220
|
#define EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5 0x0220
|
||||||
#define GPIO_SECTION_START_OFFSET 0x03
|
#define GPIO_SECTION_START_OFFSET 0x03
|
||||||
|
#define COMPATIBILITY_SECTION_LENGTH 42
|
||||||
#define COMPATIBILITY_SECTION_LENGTH 42
|
#define COMPATIBILITY_SECTION_LENGTH_MAP5 84
|
||||||
#define COMPATIBILITY_SECTION_LENGTH_MAP5 84
|
#define EEPROM_MAP5_MAJORVERSION 5
|
||||||
|
#define EEPROM_MAP5_MINORVERSION 0
|
||||||
|
|
||||||
#define EEPROM_MAP5_MAJORVERSION 5
|
|
||||||
#define EEPROM_MAP5_MINORVERSION 0
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_NUM_OF_BLINKS 10
|
#define MAX_NUM_OF_BLINKS 10
|
||||||
#define NUM_OF_GPIO_PINS 16
|
#define NUM_OF_GPIO_PINS 16
|
||||||
|
|
||||||
#define DISABLE_GPIO_NUM 0xFF
|
#define DISABLE_GPIO_NUM 0xFF
|
||||||
#define EVENT_SIGNALED 1
|
#define EVENT_SIGNALED 1
|
||||||
|
|
||||||
#define MAX_FILE_NAME_BUFFER_SIZE 100
|
#define MAX_FILE_NAME_BUFFER_SIZE 100
|
||||||
|
|
||||||
#define TURN_ON_LED(GPIO, index) do { \
|
#define TURN_ON_LED(GPIO, index) do { \
|
||||||
UINT gpio_val = GPIO; \
|
UINT gpio_val = GPIO; \
|
||||||
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
||||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
|
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
|
||||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_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 { \
|
#define TURN_OFF_LED(GPIO, index) do { \
|
||||||
UINT gpio_val = GPIO; \
|
UINT gpio_val = GPIO; \
|
||||||
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
||||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
|
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
|
||||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_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
|
#define B_ULONG32 unsigned long
|
||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
typedef enum _LEDColors {
|
||||||
|
RED_LED = 1,
|
||||||
typedef enum _LEDColors{
|
BLUE_LED = 2,
|
||||||
RED_LED = 1,
|
YELLOW_LED = 3,
|
||||||
BLUE_LED = 2,
|
GREEN_LED = 4
|
||||||
YELLOW_LED = 3,
|
|
||||||
GREEN_LED = 4
|
|
||||||
} LEDColors; /*Enumerated values of different LED types*/
|
} LEDColors; /*Enumerated values of different LED types*/
|
||||||
|
|
||||||
typedef enum LedEvents {
|
typedef enum LedEvents {
|
||||||
SHUTDOWN_EXIT = 0x00,
|
SHUTDOWN_EXIT = 0x00,
|
||||||
DRIVER_INIT = 0x1,
|
DRIVER_INIT = 0x1,
|
||||||
FW_DOWNLOAD = 0x2,
|
FW_DOWNLOAD = 0x2,
|
||||||
FW_DOWNLOAD_DONE = 0x4,
|
FW_DOWNLOAD_DONE = 0x4,
|
||||||
NO_NETWORK_ENTRY = 0x8,
|
NO_NETWORK_ENTRY = 0x8,
|
||||||
NORMAL_OPERATION = 0x10,
|
NORMAL_OPERATION = 0x10,
|
||||||
LOWPOWER_MODE_ENTER = 0x20,
|
LOWPOWER_MODE_ENTER = 0x20,
|
||||||
IDLEMODE_CONTINUE = 0x40,
|
IDLEMODE_CONTINUE = 0x40,
|
||||||
IDLEMODE_EXIT = 0x80,
|
IDLEMODE_EXIT = 0x80,
|
||||||
LED_THREAD_INACTIVE = 0x100, /* Makes the LED thread Inactivce. It wil be equivallent to putting the thread on hold. */
|
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. */
|
LED_THREAD_ACTIVE = 0x200, /* Makes the LED Thread Active back. */
|
||||||
DRIVER_HALT = 0xff
|
DRIVER_HALT = 0xff
|
||||||
} LedEventInfo_t; /* Enumerated values of different driver states */
|
} LedEventInfo_t; /* Enumerated values of different driver states */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure which stores the information of different LED types
|
* Structure which stores the information of different LED types
|
||||||
|
@ -79,24 +69,21 @@ typedef struct LedStateInfo_t {
|
||||||
UCHAR BitPolarity; /* To represent whether H/W is normal polarity or reverse polarity */
|
UCHAR BitPolarity; /* To represent whether H/W is normal polarity or reverse polarity */
|
||||||
} LEDStateInfo, *pLEDStateInfo;
|
} LEDStateInfo, *pLEDStateInfo;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _LED_INFO_STRUCT {
|
typedef struct _LED_INFO_STRUCT {
|
||||||
LEDStateInfo LEDState[NUM_OF_LEDS];
|
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 bIdleMode_tx_from_host; /* Variable to notify whether driver came out from idlemode due to Host or target*/
|
||||||
BOOLEAN bIdle_led_off;
|
BOOLEAN bIdle_led_off;
|
||||||
wait_queue_head_t notify_led_event;
|
wait_queue_head_t notify_led_event;
|
||||||
wait_queue_head_t idleModeSyncEvent;
|
wait_queue_head_t idleModeSyncEvent;
|
||||||
struct task_struct *led_cntrl_threadid;
|
struct task_struct *led_cntrl_threadid;
|
||||||
int led_thread_running;
|
int led_thread_running;
|
||||||
BOOLEAN bLedInitDone;
|
BOOLEAN bLedInitDone;
|
||||||
|
|
||||||
} LED_INFO_STRUCT, *PLED_INFO_STRUCT;
|
} LED_INFO_STRUCT, *PLED_INFO_STRUCT;
|
||||||
|
|
||||||
/* LED Thread state. */
|
/* LED Thread state. */
|
||||||
#define BCM_LED_THREAD_DISABLED 0 /* LED Thread is not running. */
|
#define BCM_LED_THREAD_DISABLED 0 /* LED Thread is not running. */
|
||||||
#define BCM_LED_THREAD_RUNNING_ACTIVELY 1 /* LED thread is running. */
|
#define BCM_LED_THREAD_RUNNING_ACTIVELY 1 /* LED thread is running. */
|
||||||
#define BCM_LED_THREAD_RUNNING_INACTIVELY 2 /*LED thread has been put on hold*/
|
#define BCM_LED_THREAD_RUNNING_INACTIVELY 2 /*LED thread has been put on hold*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue