Commit 0cfcfb31 authored by H. Nikolaus Schaller's avatar H. Nikolaus Schaller Committed by Greg Kroah-Hartman

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: default avatarH. Nikolaus Schaller <hns@goldelico.com>
Link: https://lore.kernel.org/r/2de305d3046c7281a7123347899abbaa64c54fb8.1590255176.git.hns@goldelico.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13db4c40
...@@ -146,6 +146,10 @@ static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status) ...@@ -146,6 +146,10 @@ static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
goto rtn; goto rtn;
} }
if (hdq_data->hdq_irqstatus)
dev_err(hdq_data->dev, "TX irqstatus not cleared (%02x)\n",
hdq_data->hdq_irqstatus);
*status = 0; *status = 0;
hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val); hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val);
...@@ -243,6 +247,10 @@ static int omap_hdq_break(struct hdq_data *hdq_data) ...@@ -243,6 +247,10 @@ static int omap_hdq_break(struct hdq_data *hdq_data)
goto rtn; goto rtn;
} }
if (hdq_data->hdq_irqstatus)
dev_err(hdq_data->dev, "break irqstatus not cleared (%02x)\n",
hdq_data->hdq_irqstatus);
/* set the INIT and GO bit */ /* set the INIT and GO bit */
hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS,
OMAP_HDQ_CTRL_STATUS_INITIALIZATION | OMAP_HDQ_CTRL_STATUS_GO, OMAP_HDQ_CTRL_STATUS_INITIALIZATION | OMAP_HDQ_CTRL_STATUS_GO,
......
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