Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114940
b: refs/heads/master
c: 19e7184
h: refs/heads/master
v: v3
  • Loading branch information
David Fries authored and Linus Torvalds committed Oct 16, 2008
1 parent b72cb6c commit 2f1bc9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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: e464af24734c40853dd68ec694d83a82e3930d66
refs/heads/master: 19e7184f75354c50bc196d856ff903b2add5ff5a
16 changes: 12 additions & 4 deletions trunk/drivers/w1/masters/ds2490.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
#define COMM_DT 0x2000
#define COMM_SPU 0x1000
#define COMM_F 0x0800
#define COMM_NTP 0x0400
#define COMM_NTF 0x0400
#define COMM_ICP 0x0200
#define COMM_RST 0x0100

Expand Down Expand Up @@ -440,7 +440,7 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
printk("\n");
}
#endif
} while(!(buf[0x08] & 0x20) && !(err < 0) && ++count < 100);
} while (!(buf[0x08] & ST_IDLE) && !(err < 0) && ++count < 100);

if (err >= 16 && st->status & ST_EPOF) {
printk(KERN_INFO "Resetting device after ST_EPOF.\n");
Expand Down Expand Up @@ -470,8 +470,16 @@ static int ds_reset(struct ds_device *dev)
{
int err;

//err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_F | COMM_IM | COMM_SE, SPEED_FLEXIBLE);
err = ds_send_control(dev, 0x43, SPEED_NORMAL);
/* Other potentionally interesting flags for reset.
*
* COMM_NTF: Return result register feedback. This could be used to
* detect some conditions such as short, alarming presence, or
* detect if a new device was detected.
*
* COMM_SE which allows SPEED_NORMAL, SPEED_FLEXIBLE, SPEED_OVERDRIVE:
* Select the data transfer rate.
*/
err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
if (err)
return err;

Expand Down

0 comments on commit 2f1bc9b

Please sign in to comment.