Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

w1: omap-hdq: print dev_err if irq flags are not cleared

If irq flags are not cleared for certain operations we
print an error message.

Since this should never occur in normal operation, this
patch is an optional safety-net and debugging tool.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Link: https://lore.kernel.org/r/2de305d3046c7281a7123347899abbaa64c54fb8.1590255176.git.hns@goldelico.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

H. Nikolaus Schaller and committed by
Greg Kroah-Hartman
0cfcfb31 13db4c40

+8
+8
drivers/w1/masters/omap_hdq.c
··· 146 146 goto rtn; 147 147 } 148 148 149 + if (hdq_data->hdq_irqstatus) 150 + dev_err(hdq_data->dev, "TX irqstatus not cleared (%02x)\n", 151 + hdq_data->hdq_irqstatus); 152 + 149 153 *status = 0; 150 154 151 155 hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val); ··· 246 242 ret = -EINTR; 247 243 goto rtn; 248 244 } 245 + 246 + if (hdq_data->hdq_irqstatus) 247 + dev_err(hdq_data->dev, "break irqstatus not cleared (%02x)\n", 248 + hdq_data->hdq_irqstatus); 249 249 250 250 /* set the INIT and GO bit */ 251 251 hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS,