w1: ds2413: when the slave is not responding during read, select it again
authorMariusz Bialonczyk <manio@skyboo.net>
Wed, 22 May 2019 10:40:53 +0000 (12:40 +0200)
committerPhil Elwell <phil@raspberrypi.org>
Tue, 25 Jun 2019 09:04:01 +0000 (10:04 +0100)
commiteb7c93f1db6a1e2b83d197afe79ed35ed406e953
treebd50b10921855eee9a34d4fdf0f54a065439ab83
parent55a3cf636741690dd12b9c57512a09ae999b5fc1
w1: ds2413: when the slave is not responding during read, select it again

commit 3856032a0628e6b94badb9131a706dda185e071d upstream.

The protocol is not allowing to obtain a byte of 0xff for PIO_ACCESS_READ
call. It is very likely that the slave was not addressed properly and
it is just not respoding (leaving the bus in logic high state) during
the read of sampled PIO value.
We cannot just call w1_reset_resume_command() because the problem will
persist, instead try selecting (addressing) the slave again.

Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/slaves/w1_ds2413.c