Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273274
b: refs/heads/master
c: 3fd306c
h: refs/heads/master
v: v3
  • Loading branch information
Jan Weitzel authored and Linus Torvalds committed Nov 2, 2011
1 parent a8a0ff5 commit 137aefb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68a436aec345c2bcd05dbdafae1f5f608ff8f61f
refs/heads/master: 3fd306c85adcde7209281cb663dd8ea247e97cc3
5 changes: 5 additions & 0 deletions trunk/drivers/w1/w1_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,18 @@ EXPORT_SYMBOL_GPL(w1_write_8);
static u8 w1_read_bit(struct w1_master *dev)
{
int result;
unsigned long flags;

/* sample timing is critical here */
local_irq_save(flags);
dev->bus_master->write_bit(dev->bus_master->data, 0);
w1_delay(6);
dev->bus_master->write_bit(dev->bus_master->data, 1);
w1_delay(9);

result = dev->bus_master->read_bit(dev->bus_master->data);
local_irq_restore(flags);

w1_delay(55);

return result & 0x1;
Expand Down

0 comments on commit 137aefb

Please sign in to comment.