Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44944
b: refs/heads/master
c: 3261ff4
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Starikovskiy authored and Len Brown committed Dec 8, 2006
1 parent 80d6da0 commit aeafd8c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78d0af3392cba6dfdd1dc1eab5a86ba8e4af8fff
refs/heads/master: 3261ff4db3a33ac7e1b9ed98e905663845cadbc6
24 changes: 12 additions & 12 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,26 @@ ACPI_MODULE_NAME("acpi_ec")
#define ACPI_EC_FLAG_SCI 0x20 /* EC-SCI occurred */

/* EC commands */
#define ACPI_EC_COMMAND_READ 0x80
#define ACPI_EC_COMMAND_WRITE 0x81
#define ACPI_EC_BURST_ENABLE 0x82
#define ACPI_EC_BURST_DISABLE 0x83
#define ACPI_EC_COMMAND_QUERY 0x84

enum ec_command {
ACPI_EC_COMMAND_READ = 0x80,
ACPI_EC_COMMAND_WRITE = 0x81,
ACPI_EC_BURST_ENABLE = 0x82,
ACPI_EC_BURST_DISABLE = 0x83,
ACPI_EC_COMMAND_QUERY = 0x84,
};
/* EC events */
enum {
enum ec_event {
ACPI_EC_EVENT_OBF_1 = 1, /* Output buffer full */
ACPI_EC_EVENT_IBF_0, /* Input buffer empty */
};

#define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */

enum {
static enum ec_mode {
EC_INTR = 1, /* Output buffer full */
EC_POLL, /* Input buffer empty */
};
} acpi_ec_mode = EC_INTR;

static int acpi_ec_remove(struct acpi_device *device, int type);
static int acpi_ec_start(struct acpi_device *device);
Expand Down Expand Up @@ -109,7 +110,6 @@ struct acpi_ec {

/* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec;
static int acpi_ec_mode = EC_INTR;

/* --------------------------------------------------------------------------
Transaction Management
Expand All @@ -135,7 +135,7 @@ static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
outb(data, ec->data_addr);
}

static inline int acpi_ec_check_status(struct acpi_ec *ec, u8 event)
static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event)
{
u8 status = acpi_ec_read_status(ec);

Expand All @@ -150,7 +150,7 @@ static inline int acpi_ec_check_status(struct acpi_ec *ec, u8 event)
return 0;
}

static int acpi_ec_wait(struct acpi_ec *ec, u8 event)
static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event)
{
if (acpi_ec_mode == EC_POLL) {
unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
Expand Down

0 comments on commit aeafd8c

Please sign in to comment.