[Letux-kernel] [PATCH 3/5] w1: omap-hdq: fix case of removed battery
H. Nikolaus Schaller
hns at goldelico.com
Fri May 8 16:28:18 CEST 2020
if there is no response it appears as if an OMAP_HDQ_INT_STATUS_TIMEOUT
interrupt is set by the hdq controller.
can squash with previous patch
Signed-off-by: H. Nikolaus Schaller <hns at goldelico.com>
---
drivers/w1/masters/omap_hdq.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 384dad0615a26..64fe32e74bed0 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -322,10 +322,12 @@ static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
*/
wait_event_timeout(hdq_wait_queue,
(hdq_data->hdq_irqstatus
- & OMAP_HDQ_INT_STATUS_RXCOMPLETE),
+ & (OMAP_HDQ_INT_STATUS_RXCOMPLETE |
+ OMAP_HDQ_INT_STATUS_TIMEOUT)),
OMAP_HDQ_TIMEOUT);
status = hdq_reset_irqstatus(hdq_data,
- OMAP_HDQ_INT_STATUS_RXCOMPLETE);
+ OMAP_HDQ_INT_STATUS_RXCOMPLETE |
+ OMAP_HDQ_INT_STATUS_TIMEOUT);
hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, 0,
OMAP_HDQ_CTRL_STATUS_DIR);
--
2.26.2
More information about the Letux-kernel
mailing list