From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: robh@kernel.org, devicetree@vger.kernel.org, perex@perex.cz,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
lgirdwood@gmail.com
Subject: Re: [PATCH v2 2/4] ASoC: codecs: wcd: add multi button Headset detection support
Date: Thu, 3 Jun 2021 13:58:35 +0100 [thread overview]
Message-ID: <676a583f-1bed-f837-3013-ffec7bfd36e1@linaro.org> (raw)
In-Reply-To: <20210603124455.GE4257@sirena.org.uk>
On 03/06/2021 13:44, Mark Brown wrote:
> On Mon, May 24, 2021 at 12:06:58PM +0100, Srinivas Kandagatla wrote:
>
>> + break;
>> + default:
>> + break;
>> + }
>> + return 0;
>> +}
>> +EXPORT_SYMBOL(wcd_mbhc_event_notify);
>
> Why is this not EXPORT_SYMBOL_GPL? Same for the other symbols that are
> exported, between ASoC and regmap I'm not clear that there's anything
> useful that is usable from non-GPL code...
This was not intentional, will fix this in next version.
>
>> + /* Report insertion */
>> + if (jack_type == SND_JACK_HEADPHONE)
>> + mbhc->current_plug = MBHC_PLUG_TYPE_HEADPHONE;
>> + else if (jack_type == SND_JACK_HEADSET) {
>> + mbhc->current_plug = MBHC_PLUG_TYPE_HEADSET;
>> + mbhc->jiffies_atreport = jiffies;
>> + } else if (jack_type == SND_JACK_LINEOUT)
>> + mbhc->current_plug = MBHC_PLUG_TYPE_HIGH_HPH;
>
> This would be more idiomatically written as a switch statement.
I agree, I did try to keep it mostly in switch case, looks like I missed
this one. Will change this in next spin.
--srini
>
next prev parent reply other threads:[~2021-06-03 12:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 11:06 [PATCH v2 0/4] ASoC: codecs: wcd934x: add Headset and button detection support Srinivas Kandagatla
2021-05-24 11:06 ` [PATCH v2 1/4] ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection Srinivas Kandagatla
2021-06-02 19:48 ` Rob Herring
2021-05-24 11:06 ` [PATCH v2 2/4] ASoC: codecs: wcd: add multi button Headset detection support Srinivas Kandagatla
2021-06-03 12:44 ` Mark Brown
2021-06-03 12:58 ` Srinivas Kandagatla [this message]
2021-05-24 11:06 ` [PATCH v2 3/4] ASoC: codecs: wcd934x: add mbhc support Srinivas Kandagatla
2021-05-24 11:07 ` [PATCH v2 4/4] ASoC: qcom: sdm845: add jack support for WCD934x Srinivas Kandagatla
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=676a583f-1bed-f837-3013-ffec7bfd36e1@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
/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).