Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp254753pxj; Thu, 3 Jun 2021 06:02:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws+z0PiUy92ZTpBLxWfzHb1akqAvapkE7YMQcR0FSbQC3t7j03GQD3fU7NWqMsgw/w2B0z X-Received: by 2002:a50:ec08:: with SMTP id g8mr23327705edr.376.1622725336061; Thu, 03 Jun 2021 06:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622725336; cv=none; d=google.com; s=arc-20160816; b=GqEiJmlYXaWUQKOsrICMYz23Z31vgcXxMfTjNgPkUwa9JcP/UunL9zGrew7wFv2w/K oB3uUop2w4gCYLKGmqhY/OLWbtI3GALs4p+0lz1N9YYey14dHpjc6Suuh5yYakusXQWt buOf0oyAiRT8YIOWsk669/gt6/7AloCszTAei/3GMziI63nPNCSsATc+mWfBs+vS0mjR Hw3TSGKtqcb9JNRCaJKTIaHgu1Md3hv86erJwroE9M9KqM64kc4o1Y6O3LcsWZR/NyF0 VkXa67v69SrgYmtZ252wbnyZMS8+V0C2Nz6q8+5tM+jk+FCPVhc7ksGP86sbflcZIM/j rD7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=S32qhgXw6lhcBac72fW5aifr88ZTXgBqkSLyW4FBSRE=; b=RIablEPoKYyfxRyn0W71sOAC3yerGOkA5YackBka6ACrGVz6xZbK7lO0kO29iIdcNw tQms9ll0LHeM3zypQIxScvpgTOEBW+aCDIaoyOyZpeT/VSWxfZHwnUSPY2ocL45DNpI0 RluQQ28lrG8ZvgmBtWJy9iYyM4rucHUwKZH9AsC13iI5ESoaD/RtA5lSQSUWNPeBgCmU WMTpQrszIYmgeqL6mepo4qlaSPsDo1WWpsRFlPVlvvbcR7LoUsZLa8eLnJBKPAgY2d13 20QcIrDEDkwSAzVO0wHcOOVapXCPqRzII/kJCzk7491Zd93u74rF/pvcgTyfDWUYFf4Z NSUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aDfm993C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kz13si2156738ejc.335.2021.06.03.06.01.53; Thu, 03 Jun 2021 06:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aDfm993C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbhFCNBW (ORCPT + 99 others); Thu, 3 Jun 2021 09:01:22 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:40845 "EHLO mail-ed1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbhFCNBW (ORCPT ); Thu, 3 Jun 2021 09:01:22 -0400 Received: by mail-ed1-f54.google.com with SMTP id t3so6986694edc.7 for ; Thu, 03 Jun 2021 05:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S32qhgXw6lhcBac72fW5aifr88ZTXgBqkSLyW4FBSRE=; b=aDfm993CvwBzKEU6AMF3NjjBBTCq3pYbIDf+HDoVgTqBJ5UrcUk/OuIlcxTYXL1loC TjdpT6ASpEN6RgFQTG5jrJggb5OUNheVMZjleXGXQtwdLmJqtFEwdg8WS8cSTDfM27vX rdDT/0PJl6TnTWvPQQsH7JX16wXJ6a8pqDJz9VyrS8fHhtVOMi4NzxF4ai/Wm2wr1UYJ JQilApDLYXx2/ePzQix7V+ngwWD9t3pUvHIamB20DG+ZMMmN5ce3+AwsGDGPRlJ0ZJQr xCTgCsTDQCFIrHZX3gbGw8v+QC5otgxdnbsD17u27A7ZinB+VpB8g++j3n+WllPD6acs WaDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S32qhgXw6lhcBac72fW5aifr88ZTXgBqkSLyW4FBSRE=; b=ps5AmHF8hfFB86LhsVTHh3sTGuOu7sItyUQfOFrtYs4E/6J0ccm8/9EUSMiZNrhXGp ymRgVAUGnlu/z4aHl+0d0bf8UksFhWR+L5beFKT90eEBlpaEpSAUGBBpRYjgQV6peI/W gQPlYmUKSl6j2nyeDNLbkFh7TcruP0VSCu4FHJhqDqR4nSHJCXj+TqkzC2A/R1yI5uIt ucMD8t0k9npar9Xzw8IySsH+z2rrrTHVI+INLsRzJ1WH+A8+TJABzTLukCDqWK84Y8h1 K0nPyhu4O8keIerVOOzfLBBx52jyiGR76W3Fjv22yEf4mRch4daVhkZamATFqhKIYaDH CLag== X-Gm-Message-State: AOAM531eCYYHZbfCsOvD3UPGy6NKZAf5VcUIiIPT0rCFhcbdK+tllH4o ah7LmbxucWOovcPNe6F9/9ctHA== X-Received: by 2002:aa7:dc12:: with SMTP id b18mr43396617edu.52.1622725116707; Thu, 03 Jun 2021 05:58:36 -0700 (PDT) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id ho32sm1423106ejc.82.2021.06.03.05.58.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jun 2021 05:58:36 -0700 (PDT) Subject: Re: [PATCH v2 2/4] ASoC: codecs: wcd: add multi button Headset detection support To: Mark Brown Cc: robh@kernel.org, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com References: <20210524110700.27077-1-srinivas.kandagatla@linaro.org> <20210524110700.27077-3-srinivas.kandagatla@linaro.org> <20210603124455.GE4257@sirena.org.uk> From: Srinivas Kandagatla Message-ID: <676a583f-1bed-f837-3013-ffec7bfd36e1@linaro.org> Date: Thu, 3 Jun 2021 13:58:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210603124455.GE4257@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >