Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114935
b: refs/heads/master
c: a08e2d3
h: refs/heads/master
i:
  114933: 354bf31
  114931: ec3f9d4
  114927: f40a52d
v: v3
  • Loading branch information
David Fries authored and Linus Torvalds committed Oct 16, 2008
1 parent 5be6dbf commit 502d7f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 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: e1c86d226daf95407d66246ced8fe087055acc6b
refs/heads/master: a08e2d338bab17ac5c51a8f2f25185da18f6710c
25 changes: 18 additions & 7 deletions trunk/drivers/w1/masters/ds2490.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ static int ds_touch_bit(struct ds_device *dev, u8 bit, u8 *tbit)
return 0;
}

#if 0
static int ds_write_bit(struct ds_device *dev, u8 bit)
{
int err;
Expand All @@ -538,6 +539,7 @@ static int ds_write_bit(struct ds_device *dev, u8 bit)

return 0;
}
#endif

static int ds_write_byte(struct ds_device *dev, u8 byte)
{
Expand Down Expand Up @@ -722,20 +724,14 @@ static u8 ds9490r_touch_bit(void *data, u8 bit)
return ret;
}

#if 0
static void ds9490r_write_bit(void *data, u8 bit)
{
struct ds_device *dev = data;

ds_write_bit(dev, bit);
}

static void ds9490r_write_byte(void *data, u8 byte)
{
struct ds_device *dev = data;

ds_write_byte(dev, byte);
}

static u8 ds9490r_read_bit(void *data)
{
struct ds_device *dev = data;
Expand All @@ -748,6 +744,14 @@ static u8 ds9490r_read_bit(void *data)

return bit & 1;
}
#endif

static void ds9490r_write_byte(void *data, u8 byte)
{
struct ds_device *dev = data;

ds_write_byte(dev, byte);
}

static u8 ds9490r_read_byte(void *data)
{
Expand Down Expand Up @@ -812,8 +816,15 @@ static int ds_w1_init(struct ds_device *dev)

dev->master.data = dev;
dev->master.touch_bit = &ds9490r_touch_bit;
/* read_bit and write_bit in w1_bus_master are expected to set and
* sample the line level. For write_bit that means it is expected to
* set it to that value and leave it there. ds2490 only supports an
* individual time slot at the lowest level. The requirement from
* pulling the bus state down to reading the state is 15us, something
* that isn't realistic on the USB bus anyway.
dev->master.read_bit = &ds9490r_read_bit;
dev->master.write_bit = &ds9490r_write_bit;
*/
dev->master.read_byte = &ds9490r_read_byte;
dev->master.write_byte = &ds9490r_write_byte;
dev->master.read_block = &ds9490r_read_block;
Expand Down

0 comments on commit 502d7f5

Please sign in to comment.