kernel-fxtec-pro1x/drivers/w1
Martin Fuzzey 0bfca73157 w1: mxc_w1: Fix timeout resolution problem leading to bus error
commit c9723750a699c3bd465493ac2be8992b72ccb105 upstream.

On my platform (i.MX53) bus access sometimes fails with
	w1_search: max_slave_count 64 reached, will continue next search.

The reason is the use of jiffies to implement a 200us timeout in
mxc_w1_ds2_touch_bit().
On some platforms the jiffies timer resolution is insufficient for this.

Fix by replacing jiffies by ktime_get().

For consistency apply the same change to the other use of jiffies in
mxc_w1_ds2_reset_bus().

Fixes: f80b2581a7 ("w1: mxc_w1: Optimize mxc_w1_ds2_touch_bit()")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Link: https://lore.kernel.org/r/1601455030-6607-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-05 11:08:47 +01:00
..
masters w1: mxc_w1: Fix timeout resolution problem leading to bus error 2020-11-05 11:08:47 +01:00
slaves w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size). 2019-12-01 09:16:22 +01:00
Kconfig
Makefile
w1.c w1: core: match sub-nodes of bus masters in devicetree 2018-07-11 18:09:08 +02:00
w1_family.c
w1_int.c
w1_internal.h
w1_io.c w1: fix the resume command API 2019-05-31 06:46:14 -07:00
w1_netlink.c
w1_netlink.h w1_netlink.h: add support for nested structs 2017-12-21 13:41:47 -07:00