From: Maciej Strozek <mstrozek@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: James Schulman <james.schulman@cirrus.com>,
David Rhodes <david.rhodes@cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
<alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] ASoC: cs43130: Allow driver to work without IRQ connection
Date: Mon, 20 Nov 2023 15:46:26 +0000 [thread overview]
Message-ID: <261e118d-529b-0ce0-5524-d24d767fa92f@opensource.cirrus.com> (raw)
In-Reply-To: <7248897a-0b59-4cdc-9915-d3297f2d6efe@sirena.org.uk>
W dniu 20/11/2023 o 14:40, Mark Brown pisze:
> On Mon, Nov 20, 2023 at 02:17:34PM +0000, Maciej Strozek wrote:
>> + if (to_poll == &cs43130->xtal_rdy) {
>> + offset = 0;
>> + flag = CS43130_XTAL_RDY_INT;
>> + } else if (to_poll == &cs43130->pll_rdy) {
>> + offset = 0;
>> + flag = CS43130_PLL_RDY_INT;
>> + } else if (to_poll == &cs43130->hpload_evt) {
>> + offset = 3;
>> + flag = CS43130_HPLOAD_NO_DC_INT | CS43130_HPLOAD_UNPLUG_INT |
>> + CS43130_HPLOAD_OOR_INT | CS43130_HPLOAD_AC_INT |
>> + CS43130_HPLOAD_DC_INT | CS43130_HPLOAD_ON_INT |
>> + CS43130_HPLOAD_OFF_INT;
>> + } else {
>> + return 0;
>> + }
>
> Is it a bug to call this function without to_poll set to something
> known? This will just silently ignore it which seems wrong and is
> inconsitent with the handling in the interrupt case which will wait for
> the the completion to be signalled and report a timeout on error.
>
In interrupt case 0 means timeout (and calling function should expect 0
as error/timeout), so the only inconsistency I see is in not waiting
before returning a timeout, but that would be needlessly wasting time?
Do you think adding a debug print or a comment would help here?
next prev parent reply other threads:[~2023-11-20 15:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 14:17 Maciej Strozek
2023-11-20 14:40 ` Mark Brown
2023-11-20 15:46 ` Maciej Strozek [this message]
2023-11-20 15:54 ` Mark Brown
2023-11-20 16:16 ` Charles Keepax
2023-11-20 16:19 ` Mark Brown
2023-11-20 19:18 ` Mark Brown
2023-11-20 19:22 ` Mark Brown
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=261e118d-529b-0ce0-5524-d24d767fa92f@opensource.cirrus.com \
--to=mstrozek@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=james.schulman@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/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
all inboxes | Powered by JetHome®