Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4586191rdh; Wed, 29 Nov 2023 05:46:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXZr1zvmlQqKbKIi1DzlXAWfLQXySBD69Mr/sdNkwOMIxHZLEbEyiDZ4xehOlvTTMTxcNp X-Received: by 2002:a17:903:244e:b0:1cf:de12:5cb5 with SMTP id l14-20020a170903244e00b001cfde125cb5mr14133150pls.29.1701265585301; Wed, 29 Nov 2023 05:46:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701265585; cv=none; d=google.com; s=arc-20160816; b=Lg7RDCUQ9hNbwJW4Au4AQfu4P10sbaAZX9BKOHruErWjbRYFaYvWJlHTTdj/BE5Yjd HD3cjCxQq2Rn4SayyTxG1x2G7L8ujyRyh4TvH4vB25aBGcFUS6SR5zBkCKi78NuvGVEy V7eZcpPMsW/DOyBqBm/WCgkif18eLHSN+yUTvyYMtRJ9I4j2iip9oKhc5NnoQLZOsc/q /EewfbMTU92QNzyMC6Lor9SJt7wyBxHTkmtrwIhVnOsSkIZ1LWnXaWKioDOPGdhpY62o dbvZQQovFHWIPtjQQ0nxo5f0ZBOe/zptH6ZQrt5/bb4SttDnkc0hjNEcTm4i+azXggU4 2unQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=cBSFdLwbP6iBVNXIZiTcHgh2DF6/dUUBZvh33dWqRVw=; fh=0QpUgYLdvPEHfiRYi4utOA4Z2Wbe0MhbGvJSQ8M9Mno=; b=yYWNzDJqhAHcY8hbnd1a6paUk8Zm43+h3ANwQuyalVC5z6Zt+EbIX97nbPVZSu/CYK JEcmpDqmSI/ZKnOrbnzqdg+iWEQSU0dnQpm2UpX3NmOk6s1mebpPTWMfLH4wujzsYMcI BFtmtX8VNdobGLsGkzxpZ46d0iSxn1sRgEf2q/cGFv0GgaDdLafCA1RSJQ1PgiRPq84U VAfbkOy3PkL13YpEIwBcAh1IJmdRWBpJ1ITFG4F5T3TjOJoDgYG/sB8wRsWK4hWgFLnu SE9MaXkl+kIYtJ41Fkif4FylbJXe+HWHzMG+QnqLLgBYaey7HWCUm0IqB4jaglUU3ISF xekA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ndQqp4Eq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ix13-20020a170902f80d00b001cfb29b9c0bsi9720503plb.161.2023.11.29.05.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:46:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ndQqp4Eq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AA3A880AEF99; Wed, 29 Nov 2023 05:46:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233595AbjK2NqD (ORCPT + 99 others); Wed, 29 Nov 2023 08:46:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232012AbjK2NqB (ORCPT ); Wed, 29 Nov 2023 08:46:01 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE9FFDD for ; Wed, 29 Nov 2023 05:46:07 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a02ba1f500fso967158966b.0 for ; Wed, 29 Nov 2023 05:46:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701265566; x=1701870366; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cBSFdLwbP6iBVNXIZiTcHgh2DF6/dUUBZvh33dWqRVw=; b=ndQqp4EqJFuOHsJ4UojbzmjlRhGVkSvuzKjpuFiK7LrqFkR/6/n1PVRyXDoQdVzx8r WfkWSjp4b3M9Zrrm+2qSJ4sMdCp8eqp41yxs7saqytWR6FvUudYF6v+1wb518DTsorjI Jb8QFMQybb15c+rT11lD2xZ329VZHeise3w9BDwiyhMjwp31ZUx4w4SUUKFG/T0OAtDq UMWUO9VVuZmcw/Kjto6WYU8ef8g5Y3ppcyNXshGIwZoU6f/+3f9cZCiWuXHQrJPvD2Kx YiMEvW3Dg/te7F32vy4S5PJ7yH86DFTRhxInQ+5ybz+K+JZ7r0mLswlru0JgmfWVXltB gBgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701265566; x=1701870366; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cBSFdLwbP6iBVNXIZiTcHgh2DF6/dUUBZvh33dWqRVw=; b=q0hXNbHXwI1f8B9mw47Irt9oVzJV34QzVdSS9wQEwXwEjH26RMxMr4Dpva3mjo9ZiO R34woLZwyd9UfDnlkxVzM4LS5R/m9j57SQUADbE7BHn1bga1E5gKogDiFPJ1U16Ul0og GEMI6eK1mCVnoi5DPi5pKmp1A2Nc/2ObNbKXR1hIjWeBmyTw2y3C4t+isG5aArA3AFic D67yxsOfZCUxDWnk+5TMHx0cSCtpYoUGzZRNFTwMwUShZJSmw5K/bl6AhyrN0w4js1zd 6KCj26uIQ+J9/yZZsYnGe7V4djy8/5UlDpsrd/Wvg1cjCsh/vezumyKiJZYv536Q8Lv7 0AOA== X-Gm-Message-State: AOJu0YyatGDNnDyBLFeriUmG5RkQeYyaVfy1PZNeLvh5vGDi1Tfesy0+ voSYWZaE4TNeKP1bFo7PEn+bdg== X-Received: by 2002:a17:906:b299:b0:a03:ad29:a00b with SMTP id q25-20020a170906b29900b00a03ad29a00bmr15555698ejz.36.1701265566229; Wed, 29 Nov 2023 05:46:06 -0800 (PST) Received: from [192.168.209.173] (178235187166.dynamic-4-waw-k-2-3-0.vectranet.pl. [178.235.187.166]) by smtp.gmail.com with ESMTPSA id f8-20020a17090624c800b009fd77d78f7fsm7910195ejb.116.2023.11.29.05.46.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 05:46:05 -0800 (PST) Message-ID: Date: Wed, 29 Nov 2023 14:46:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] ASoC: codecs: Add WCD939x Codec driver Content-Language: en-US To: neil.armstrong@linaro.org, Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai Cc: linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231123-topic-sm8650-upstream-wcd939x-codec-v1-0-21d4ad9276de@linaro.org> <20231123-topic-sm8650-upstream-wcd939x-codec-v1-5-21d4ad9276de@linaro.org> <42a6f6e0-2846-4cdc-8702-493fadbafb98@linaro.org> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb25yYWQuZHliY2lvQGxpbmFyby5vcmc+wsGOBBMBCAA4FiEEU24if9oCL2zdAAQV R4cBcg5dfFgFAmQ5bqwCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQR4cBcg5dfFjO BQ//YQV6fkbqQCceYebGg6TiisWCy8LG77zV7DB0VMIWJv7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/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <42a6f6e0-2846-4cdc-8702-493fadbafb98@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 05:46:20 -0800 (PST) On 28.11.2023 16:01, Neil Armstrong wrote: > On 25/11/2023 13:07, Konrad Dybcio wrote: > > > >>> + >>> +static int wcd939x_io_init(struct snd_soc_component *component) >>> +{ >>> +    snd_soc_component_write_field(component, WCD939X_ANA_BIAS, >>> +                      WCD939X_BIAS_ANALOG_BIAS_EN, 1); >> All of these values are BIT()s or 2-4 ORed BIT()s, can you check what they >> mean? >> >> Same for almost all other snd_soc_component_ write/modify functions > > It uses snd_soc_component_write_field() with is the same as > regmap_write_bits(REGISTER, REGISTER_MASK, >                   FIELD_PREP(REGISTER_MASK, value); > > So the 1 mean write in enable mask in this case, and mask is single bit, > read it exactly like if it was using FIELD_PREP(), but even for BITs. > > I did check every single snd_soc_component_write_field() so far to check > it matches. > > Or it's another question ? What I wanted to ask is whether it's possible to #define these magic values within these fields Konrad