Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23237
b: refs/heads/master
c: f933ff5
h: refs/heads/master
i:
  23235: 64eaf68
v: v3
  • Loading branch information
Ben Gardner authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 44635f6 commit 7f56ce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: 16ffc5c99554bc1630bc3939e0950a75b2b1c811
refs/heads/master: f933ff504f5b3f0f94b98d69d48fc8d3c1e92267
13 changes: 2 additions & 11 deletions trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ static int base[MAX_DEVICES] = { 0x820, 0x840 };
module_param_array(base, int, NULL, 0);
MODULE_PARM_DESC(base, "Base addresses for the ACCESS.bus controllers");

/* The hardware supports interrupt driven mode too, but I haven't
implemented that. */
#define POLLED_MODE 1
#define POLL_TIMEOUT (HZ)
#define POLL_TIMEOUT (HZ/5)

enum scx200_acb_state {
state_idle,
Expand Down Expand Up @@ -222,7 +219,6 @@ static void scx200_acb_machine(struct scx200_acb_iface *iface, u8 status)
iface->needs_reset = 1;
}

#ifdef POLLED_MODE
static void scx200_acb_poll(struct scx200_acb_iface *iface)
{
u8 status;
Expand All @@ -235,7 +231,7 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface)
scx200_acb_machine(iface, status);
return;
}
msleep(10);
yield();
}

dev_err(&iface->adapter.dev, "timeout in state %s\n",
Expand All @@ -245,7 +241,6 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface)
iface->result = -EIO;
iface->needs_reset = 1;
}
#endif /* POLLED_MODE */

static void scx200_acb_reset(struct scx200_acb_iface *iface)
{
Expand Down Expand Up @@ -335,12 +330,8 @@ static s32 scx200_acb_smbus_xfer(struct i2c_adapter *adapter,
else
iface->state = state_address;

#ifdef POLLED_MODE
while (iface->state != state_idle)
scx200_acb_poll(iface);
#else /* POLLED_MODE */
#error Interrupt driven mode not implemented
#endif /* POLLED_MODE */

if (iface->needs_reset)
scx200_acb_reset(iface);
Expand Down

0 comments on commit 7f56ce5

Please sign in to comment.