From: Jianqun <xjq@rock-chips.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.de, tbleung@chromium.org, dgreid@chromium.org,
kevin.strasser@intel.com, swarren@nvidia.com,
ralph.birt@maximintegrated.com
Cc: heiko@sntech.de, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: max98090 not need to return fail if fail to request hpdet irq.
Date: Wed, 30 Jul 2014 17:00:16 +0800 [thread overview]
Message-ID: <53D8B420.9050504@rock-chips.com> (raw)
In-Reply-To: <53D890C7.4080201@linux.intel.com>
On 2014年07月30日 14:29, Jarkko Nikula wrote:
> On 07/30/2014 04:50 AM, jianqun wrote:
>> From: xujianqun <xjq@rock-chips.com>
>>
>> Since hardware may not MUST to use IRQ pin of max98090 as jack detect, the
>> driver can work well without it, can report jack trigger to CPU by a GPIO.
>>
>> But here driver will register fail caused by failed to request irq.
>>
>> Signed-off-by: xujianqun <xjq@rock-chips.com>
>> ---
>> sound/soc/codecs/max98090.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
>> index 566919c..bc124ff 100644
>> --- a/sound/soc/codecs/max98090.c
>> +++ b/sound/soc/codecs/max98090.c
>> @@ -2515,6 +2515,8 @@ static int max98090_probe(struct snd_soc_codec *codec)
>> max98090_add_widgets(codec);
>> + return 0;
>> +
>> err_access:
>> return ret;
>> }
> I would say it's better to call request_threaded_irq() conditionally when max98090->irq is valid in the same max98090_probe(). Also code should return instantly in case of request_threaded_irq() fails for valid irq.
>
> Now code is still printing needless error message in case max98090->irq is invalid or not specified and continue probing in case request_threaded_irq() fails for valid irq.
>
Add a valid check could be better, thanks Jarkko~
I'm working a board with max98090, this is a really problem for me now,
the IRQ shouldn't cause the driver fail to register.
--
-------------
许 剑 群 Jay
Rockchip Electronics Co.Ltd
****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************
next prev parent reply other threads:[~2014-07-30 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 1:50 [PATCH] ASoC: max98090 not need to return fail if fail to request hpdet irq jianqun
2014-07-30 6:29 ` Jarkko Nikula
2014-07-30 9:00 ` Jianqun [this message]
2014-07-30 8:54 ` [PATCH] ASoC: max98090 add irq valid check jianqun
2014-07-30 14:21 ` [alsa-devel] " Jarkko Nikula
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=53D8B420.9050504@rock-chips.com \
--to=xjq@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dgreid@chromium.org \
--cc=heiko@sntech.de \
--cc=jarkko.nikula@linux.intel.com \
--cc=kevin.strasser@intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ralph.birt@maximintegrated.com \
--cc=swarren@nvidia.com \
--cc=tbleung@chromium.org \
--cc=tiwai@suse.de \
/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