Commit e1c86d22 authored by David Fries's avatar David Fries Committed by Linus Torvalds

W1: ds2490.c ds_write_bit, grouping error, disable readback

ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment
that it will no longer generate a read back data byte.  If there is an
extra data byte later on then it will cause an error and discard what data
was there.  Corrected operator ordering for ds_send_control.
Signed-off-by: default avatarDavid Fries <david@fries.net>
Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1f4ec2d7
...@@ -525,7 +525,12 @@ static int ds_write_bit(struct ds_device *dev, u8 bit) ...@@ -525,7 +525,12 @@ static int ds_write_bit(struct ds_device *dev, u8 bit)
int err; int err;
struct ds_status st; struct ds_status st;
err = ds_send_control(dev, COMM_BIT_IO | COMM_IM | (bit) ? COMM_D : 0, 0); /* Set COMM_ICP to write without a readback. Note, this will
* produce one time slot, a down followed by an up with COMM_D
* only determing the timing.
*/
err = ds_send_control(dev, COMM_BIT_IO | COMM_IM | COMM_ICP |
(bit ? COMM_D : 0), 0);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment