From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D679FC04A95 for ; Tue, 25 Oct 2022 12:20:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 43D0C4FD1; Tue, 25 Oct 2022 14:19:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 43D0C4FD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1666700401; bh=zO5lhBsH4jkb1KD7nfOrDgika+98FPQC/yfXl2KoAVI=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eZq/lL6QaLJkLre0uwXsyNb35Vz5fC6QejqUIJdCD6SkTkeuTb/ydhIOUgKCdTuo7 HapWXxe7Ui468BAaRlT5rky6zsiNa1tIjN5+kG7tD05crzav2eLNZDkHvrhqG/1gai +c/RY1vTRtFBk9KTFXqgZtX82mJMrECOpmpohFFU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E3877F8042F; Tue, 25 Oct 2022 14:19:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B9EE6F80431; Tue, 25 Oct 2022 14:19:09 +0200 (CEST) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 49B77F80240 for ; Tue, 25 Oct 2022 14:19:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 49B77F80240 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HMcCNMgI" Received: by mail-qt1-x836.google.com with SMTP id f22so7332594qto.3 for ; Tue, 25 Oct 2022 05:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qKDSkNGJdreMgm3y1fnkqMMOtoJ4CwGZ1aA+ETdnP5M=; b=HMcCNMgIMtRibFlfaeFOC1TUxpXIRLqgkjuYOfbW0nQP1Mg0YUKXcGkFu4ff4vS1/u 7hSPHlr0F3rKCnREdTn/8uLk3gQQIyo/RTeCrE5ZBndZLlc7DfJXXOZUUaq4px+0VCLa Cv+smwbwojc282ovhmlzY+/caN8iDoi643eGii2QDUNTZub2jYSM0JvLAf1lTV/8BGUZ g51ttsT1CZvYC7a+ckbuUN7gsaCvJYPG5seh+/HYx1gfN77Cf7SkOXtA4LohMQUQ15PV jUdfp3aASg/HT7frCeDgDOYO8KF0XomYyfu8vpq2n2XGDLPdnQmD7jkMyKiBRyWACwuI xfLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to: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=qKDSkNGJdreMgm3y1fnkqMMOtoJ4CwGZ1aA+ETdnP5M=; b=JPRsbiX/v2tipYDSej8dPELmQIi+kSjjpystvL/ZU0ts9OVpIoTPUUDYAGgMIR8GDW kMtu5DX9TaIn1CynxCgal9mOc30BBjd3j9ltlBeSh2rr+XN1WjkJU6gdv3LGQbFjtSGM CWCw1eI+r4Wxg5vQMR3EE4fQ9CLN4gdNJ5RcDQuUX9kHG50iIHhcjqxxpien/7wQmyFU 8HgTCn8zdK2uv+V1Q0LS1AjLn1nbMQRDsSbhzTu/btl3UyAtNxw0GrkA7XNEKuktKgBI M9PV3RrFE2UYo8TUJzI+DahWqI0hYNWu9Iq/DkJiQeE461rQEJM752iZlLu99kri04gw bl4g== X-Gm-Message-State: ACrzQf3vczEpl7keLXfkSiAeG8JfVRPw8WBWbTneCFDdCAVr+9X8kaIx o2ovGge/u2anZdkUiVP+PyZebA== X-Google-Smtp-Source: AMsMyM6CmOT2i+snHgfCM1wCFxDmt74cMIkOkNAQxWTW3eEk0hFvMogIjQc/QEtbABWr5V5GhkSnng== X-Received: by 2002:ac8:5f10:0:b0:39d:290:3f6e with SMTP id x16-20020ac85f10000000b0039d02903f6emr26321959qta.108.1666700344432; Tue, 25 Oct 2022 05:19:04 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id l4-20020a05620a28c400b006ecf030ef15sm1956757qkp.65.2022.10.25.05.19.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Oct 2022 05:19:03 -0700 (PDT) Message-ID: <38205667-d36f-e7a9-21b0-2e8597a662ff@linaro.org> Date: Tue, 25 Oct 2022 08:19:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v1 2/2] dt-bindings: ASoC: simple-card: Add system-clock-id property Content-Language: en-US To: Aidan MacDonald References: <20221022162742.21671-1-aidanmacdonald.0x0@gmail.com> <20221022162742.21671-2-aidanmacdonald.0x0@gmail.com> <4ef59d94-d045-55fc-d531-c84e7edb8333@linaro.org> <66c1a100-922e-4a33-e80c-fc80866acf03@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org, krzysztof.kozlowski+dt@linaro.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 25/10/2022 05:14, Aidan MacDonald wrote: >> Krzysztof > > Device trees already use standardized enumerations in other areas so it > isn't a new idea. Look under include/dt-bindings/clock. Every header > there contains an arbitrary enumeration of a device's clocks. In fact > most of include/dt-bindings is exactly for this purpose, to define > standard values that are not "just numbers" but an enum, a flag, etc, > with a special meaning. It is not specific to clocks. > > There is no dt-binding for system clock ID, because prior to this patch > they were not exposed to DT in any way. But the enumerations themselves > already exist, eg. the IDs for nau8821 codec: > > /* System Clock Source */ > enum { > NAU8821_CLK_DIS, > NAU8821_CLK_MCLK, > NAU8821_CLK_INTERNAL, > NAU8821_CLK_FLL_MCLK, > NAU8821_CLK_FLL_BLK, > NAU8821_CLK_FLL_FS, > }; OK, this looks good. > > We would just be moving these into dt-bindings if somebody wants to > use a codec with simple-card. Future drivers would add the enum into > dt-bindings from the start because that's where it belongs. And the remaining piece I don't get is that these are not bindings for codec, but for sound audio card. You want to set "system-clock-id" property for audio card, while putting clock from codec, which will be used to pass back to the codec... so it is a property of the codec, not of the audio card. IOW, NAU8821_CLK_* does not configure here the clock of the system, but only, only clock of the codec. Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B0A4C04A95 for ; Tue, 25 Oct 2022 12:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbiJYMTH (ORCPT ); Tue, 25 Oct 2022 08:19:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbiJYMTG (ORCPT ); Tue, 25 Oct 2022 08:19:06 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52B32181C90 for ; Tue, 25 Oct 2022 05:19:05 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id cr19so7371629qtb.0 for ; Tue, 25 Oct 2022 05:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qKDSkNGJdreMgm3y1fnkqMMOtoJ4CwGZ1aA+ETdnP5M=; b=HMcCNMgIMtRibFlfaeFOC1TUxpXIRLqgkjuYOfbW0nQP1Mg0YUKXcGkFu4ff4vS1/u 7hSPHlr0F3rKCnREdTn/8uLk3gQQIyo/RTeCrE5ZBndZLlc7DfJXXOZUUaq4px+0VCLa Cv+smwbwojc282ovhmlzY+/caN8iDoi643eGii2QDUNTZub2jYSM0JvLAf1lTV/8BGUZ g51ttsT1CZvYC7a+ckbuUN7gsaCvJYPG5seh+/HYx1gfN77Cf7SkOXtA4LohMQUQ15PV jUdfp3aASg/HT7frCeDgDOYO8KF0XomYyfu8vpq2n2XGDLPdnQmD7jkMyKiBRyWACwuI xfLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to: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=qKDSkNGJdreMgm3y1fnkqMMOtoJ4CwGZ1aA+ETdnP5M=; b=xhnS4bvOcjWNxB1lt3JZURQwJjU0FKWTwbvchfg4kGX8KBoYDnAuiX51i3xPb32cta iwcPJdzameOgb7EJ9D5Pg+wiKDc3Ez+tqdYm9t69TQw2+a6WDM0OKh+lMVV8nCpsqJ/H 5wldTC5rTV4VKGZwu5Z1GrtcfX6i2cKNnf9BKjPmibLViYIBOVwoUKj4rCufvwqeYHwy sQfYxqM0acYzYYc9cJZZB7gPvqi2iLO2Xc0Ote//izhtWr3/P9i3pPwy4Yj3Mx93IYCj p2EWM+MUv8CkEZC3mYdlWiqlkiLpyEAEzz9rYcRPyhdd9NIxrGgK2NjnEQdOHGAecpKc 6T3A== X-Gm-Message-State: ACrzQf2S0n9RWF3KvalC5uQDxY0LD+uqW3+kLDiRDOAvBGcDdMTWPMX4 ZtmpEESiDrry3ZqNbrCgkBZWfg== X-Google-Smtp-Source: AMsMyM6CmOT2i+snHgfCM1wCFxDmt74cMIkOkNAQxWTW3eEk0hFvMogIjQc/QEtbABWr5V5GhkSnng== X-Received: by 2002:ac8:5f10:0:b0:39d:290:3f6e with SMTP id x16-20020ac85f10000000b0039d02903f6emr26321959qta.108.1666700344432; Tue, 25 Oct 2022 05:19:04 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id l4-20020a05620a28c400b006ecf030ef15sm1956757qkp.65.2022.10.25.05.19.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Oct 2022 05:19:03 -0700 (PDT) Message-ID: <38205667-d36f-e7a9-21b0-2e8597a662ff@linaro.org> Date: Tue, 25 Oct 2022 08:19:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v1 2/2] dt-bindings: ASoC: simple-card: Add system-clock-id property Content-Language: en-US To: Aidan MacDonald Cc: broonie@kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, kuninori.morimoto.gx@renesas.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221022162742.21671-1-aidanmacdonald.0x0@gmail.com> <20221022162742.21671-2-aidanmacdonald.0x0@gmail.com> <4ef59d94-d045-55fc-d531-c84e7edb8333@linaro.org> <66c1a100-922e-4a33-e80c-fc80866acf03@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 25/10/2022 05:14, Aidan MacDonald wrote: >> Krzysztof > > Device trees already use standardized enumerations in other areas so it > isn't a new idea. Look under include/dt-bindings/clock. Every header > there contains an arbitrary enumeration of a device's clocks. In fact > most of include/dt-bindings is exactly for this purpose, to define > standard values that are not "just numbers" but an enum, a flag, etc, > with a special meaning. It is not specific to clocks. > > There is no dt-binding for system clock ID, because prior to this patch > they were not exposed to DT in any way. But the enumerations themselves > already exist, eg. the IDs for nau8821 codec: > > /* System Clock Source */ > enum { > NAU8821_CLK_DIS, > NAU8821_CLK_MCLK, > NAU8821_CLK_INTERNAL, > NAU8821_CLK_FLL_MCLK, > NAU8821_CLK_FLL_BLK, > NAU8821_CLK_FLL_FS, > }; OK, this looks good. > > We would just be moving these into dt-bindings if somebody wants to > use a codec with simple-card. Future drivers would add the enum into > dt-bindings from the start because that's where it belongs. And the remaining piece I don't get is that these are not bindings for codec, but for sound audio card. You want to set "system-clock-id" property for audio card, while putting clock from codec, which will be used to pass back to the codec... so it is a property of the codec, not of the audio card. IOW, NAU8821_CLK_* does not configure here the clock of the system, but only, only clock of the codec. Best regards, Krzysztof