Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281313
b: refs/heads/master
c: 9176205
h: refs/heads/master
i:
  281311: ceabfdb
v: v3
  • Loading branch information
Xi Wang authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent d499af5 commit 2518b11
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 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: fb927284e4d3a0c50a47063ff9be1fe3f5511f61
refs/heads/master: 91762057f439bb0adb33ca857b6022fda4b1fd69
4 changes: 2 additions & 2 deletions trunk/drivers/staging/olpc_dcon/olpc_dcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ static int dcon_resume(struct i2c_client *client)
irqreturn_t dcon_interrupt(int irq, void *id)
{
struct dcon_priv *dcon = id;
int status = pdata->read_status();
u8 status;

if (status == -1)
if (pdata->read_status(&status))
return IRQ_NONE;

switch (status & 3) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/olpc_dcon/olpc_dcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct dcon_platform_data {
int (*init)(struct dcon_priv *);
void (*bus_stabilize_wiggle)(void);
void (*set_dconload)(int);
u8 (*read_status)(void);
int (*read_status)(u8 *);
};

#include <linux/interrupt.h>
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/staging/olpc_dcon/olpc_dcon_xo_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,15 @@ static void dcon_set_dconload_1(int val)
gpio_set_value(OLPC_GPIO_DCON_LOAD, val);
}

static u8 dcon_read_status_xo_1(void)
static int dcon_read_status_xo_1(u8 *status)
{
u8 status;

status = gpio_get_value(OLPC_GPIO_DCON_STAT0);
status |= gpio_get_value(OLPC_GPIO_DCON_STAT1) << 1;
*status = gpio_get_value(OLPC_GPIO_DCON_STAT0);
*status |= gpio_get_value(OLPC_GPIO_DCON_STAT1) << 1;

/* Clear the negative edge status for GPIO7 */
cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_NEGATIVE_EDGE_STS);

return status;
return 0;
}

struct dcon_platform_data dcon_pdata_xo_1 = {
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,18 @@ static void dcon_set_dconload_xo_1_5(int val)
gpio_set_value(VX855_GPIO(1), val);
}

static u8 dcon_read_status_xo_1_5(void)
static int dcon_read_status_xo_1_5(u8 *status)
{
u8 status;

if (!dcon_was_irq())
return -1;

/* i believe this is the same as "inb(0x44b) & 3" */
status = gpio_get_value(VX855_GPI(10));
status |= gpio_get_value(VX855_GPI(11)) << 1;
*status = gpio_get_value(VX855_GPI(10));
*status |= gpio_get_value(VX855_GPI(11)) << 1;

dcon_clear_irq();

return status;
return 0;
}

struct dcon_platform_data dcon_pdata_xo_1_5 = {
Expand Down

0 comments on commit 2518b11

Please sign in to comment.