From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Evgeniy Polyakov <zbr@ioremap.net>,
"H. Nikolaus Schaller" <hns@goldelico.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
YueHaibing <yuehaibing@huawei.com>,
Tony Lindgren <tony@atomide.com>
Cc: linux-kernel@vger.kernel.org, kernel@pyra-handheld.com,
letux-kernel@openphoenux.org, linux-omap@vger.kernel.org
Subject: [PATCH 4/4] w1: omap-hdq: print dev_err if irq flags are not cleared
Date: Sat, 23 May 2020 19:32:57 +0200 [thread overview]
Message-ID: <2de305d3046c7281a7123347899abbaa64c54fb8.1590255176.git.hns@goldelico.com> (raw)
In-Reply-To: <cover.1590255176.git.hns@goldelico.com>
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>
---
drivers/w1/masters/omap_hdq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index a6484700f3b388..bf2ec59c1f9ddc 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -146,6 +146,10 @@ static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
goto rtn;
}
+ if (hdq_data->hdq_irqstatus)
+ dev_err(hdq_data->dev, "TX irqstatus not cleared (%02x)\n",
+ hdq_data->hdq_irqstatus);
+
*status = 0;
hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val);
@@ -243,6 +247,10 @@ static int omap_hdq_break(struct hdq_data *hdq_data)
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 */
hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS,
OMAP_HDQ_CTRL_STATUS_INITIALIZATION | OMAP_HDQ_CTRL_STATUS_GO,
--
2.26.2
next prev parent reply other threads:[~2020-05-23 17:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 17:32 [PATCH 0/4] w1: omap: fix some regressions/bugs (some were introduced in v5.6 but some are older) H. Nikolaus Schaller
2020-05-23 17:32 ` [PATCH 1/4] w1: omap-hdq: cleanup to add missing newline for some dev_dbg H. Nikolaus Schaller
2020-05-23 18:09 ` Tony Lindgren
2020-05-23 17:32 ` [PATCH 2/4] w1: omap-hdq: fix return value to be -1 if there is a timeout H. Nikolaus Schaller
2020-05-23 18:11 ` Tony Lindgren
2020-05-23 17:32 ` [PATCH 3/4] w1: omap-hdq: fix interrupt handling which did show spurious timeouts H. Nikolaus Schaller
2020-05-27 16:46 ` Tony Lindgren
2020-05-23 17:32 ` H. Nikolaus Schaller [this message]
2020-05-27 16:46 ` [PATCH 4/4] w1: omap-hdq: print dev_err if irq flags are not cleared Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2de305d3046c7281a7123347899abbaa64c54fb8.1590255176.git.hns@goldelico.com \
--to=hns@goldelico.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pyra-handheld.com \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=yuehaibing@huawei.com \
--cc=zbr@ioremap.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).