From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6637B79F9 for ; Sat, 6 Jan 2024 15:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DdDSQofk" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-555144cd330so581761a12.2 for ; Sat, 06 Jan 2024 07:25:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704554750; x=1705159550; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=OcjHfgODRNt+KFLJZW+qt8wg+xFuzUGbD/7t6KtlsPc=; b=DdDSQofknDd7UUpCZ5h7u7Gyfdc416oilOljBG1Z5TYPCdDdcAMcvMH0WkK/dDUwLs 74Coa15Dg0+2ITbL5NS8wvjeKDm1YCt1YNNURI2Qb4qmlfm1+McEDxf6aDi5TaRcfXxl Yt/1GfR2JsPKiX4pIbig+41swWO80EuG+d/epcOMutUhG2Ig4HYSi4j9oeKsJM0vn+qi glgoVmc68Xa3qKvFIkiR0FPBuubWvaP8tgpv8K+0TuG5FtJmoHKcDOawYZMkOaCTsBER PNyRIkeiT7z83P46um0ktGBKOu7/umW7aaThTfIEBEBb/M/5pQ4p1KUxCOhh1jXLfhyf /Rnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704554750; x=1705159550; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OcjHfgODRNt+KFLJZW+qt8wg+xFuzUGbD/7t6KtlsPc=; b=htzTkofgN6a3n1gwrS1KM8ByuhOcvKkmQUx006QHN3WesZlvFukAGN/xRmeB3rCjRd ojr2keHT9/+J2DUKlBdhNHVBaBzPADGPjVqPPogxTl7e/RAgMoa2dAY/Nc3Wri4ArmRx 2xmbIiS8J0oz9WJD3dBewSGDvWU051mr08HRivtZZVuQStYjXRSLG2ufFqIqYD+wKhCU g38yeUitoWFPV89+jdXZeEPXJjUEEWVpl0FMFqRJeCnGTtFkcfULuOCKBgqa5cYOZEv8 zFDgnaIM9SN25weVQQhST0HrTGW/f3PqzTYOMj9ldWq7lGsCA8LJ2CY4VQ/lVGSQOhaJ hSqw== X-Gm-Message-State: AOJu0YzkuUnzbb3M6QTKEqB3LVM3480eP/h4nu8RqCaqPOn9KYjBT8fG mx1E28cblRNGHkHTW0vj8AjMtmVuY67lcA== X-Google-Smtp-Source: AGHT+IFB0zGz9gSAgm1ISn8yYjF8oEreli2U1lqQx7WM65GroIfSdMClbQh9kAKJ7fNVREJ/zVWMwQ== X-Received: by 2002:a17:906:80ca:b0:a28:ad2c:f0e4 with SMTP id a10-20020a17090680ca00b00a28ad2cf0e4mr476053ejx.42.1704554749609; Sat, 06 Jan 2024 07:25:49 -0800 (PST) Received: from [192.168.1.20] ([178.197.223.112]) by smtp.gmail.com with ESMTPSA id jo21-20020a170906f6d500b00a275637e699sm2050304ejb.166.2024.01.06.07.25.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Jan 2024 07:25:49 -0800 (PST) Message-ID: Date: Sat, 6 Jan 2024 16:25:46 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] clk: qcom: hfpll: Add QCS404-specific compatible To: Luca Weiss , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231231-hfpll-yaml-v1-0-359d44a4e194@z3ntu.xyz> <20231231-hfpll-yaml-v1-2-359d44a4e194@z3ntu.xyz> <588dd6c3-7d2b-48db-b5ea-48a07077dc5d@linaro.org> <6706261.DvuYhMxLoT@z3ntu.xyz> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlB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MZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <6706261.DvuYhMxLoT@z3ntu.xyz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 06/01/2024 11:19, Luca Weiss wrote: > On Dienstag, 2. Jänner 2024 11:41:26 CET Krzysztof Kozlowski wrote: >> On 31/12/2023 15:48, Luca Weiss wrote: >>> It doesn't appear that the configuration is for the HFPLL is generic, so >> >> That's ok... >> >>> add a qcs404-specific compatible and rename the existing struct to >> >> but why this is the solution? If the qcom,hfpll compatible was >> deprecated, but it is not. This commit is contradictory to the bindings. >> >>> qcs404. >>> >>> Signed-off-by: Luca Weiss >>> --- >>> >>> drivers/clk/qcom/hfpll.c | 6 ++++-- >>> 1 file changed, 4 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c >>> index dac27e31ef60..5b12982519be 100644 >>> --- a/drivers/clk/qcom/hfpll.c >>> +++ b/drivers/clk/qcom/hfpll.c >>> @@ -14,7 +14,7 @@ >>> >>> #include "clk-regmap.h" >>> #include "clk-hfpll.h" >>> >>> -static const struct hfpll_data hdata = { >>> +static const struct hfpll_data qcs404 = { >>> >>> .mode_reg = 0x00, >>> .l_reg = 0x04, >>> .m_reg = 0x08, >>> >>> @@ -84,10 +84,12 @@ static const struct hfpll_data msm8976_cci = { >>> >>> }; >>> >>> static const struct of_device_id qcom_hfpll_match_table[] = { >>> >>> - { .compatible = "qcom,hfpll", .data = &hdata }, >>> >>> { .compatible = "qcom,msm8976-hfpll-a53", .data = &msm8976_a53 }, >>> { .compatible = "qcom,msm8976-hfpll-a72", .data = &msm8976_a72 }, >>> { .compatible = "qcom,msm8976-hfpll-cci", .data = &msm8976_cci }, >>> >>> + { .compatible = "qcom,qcs404-hfpll", .data = &qcs404 }, >>> + /* deprecated, use SoC-specific compatible */ >> >> Why? That's not a deprecated compatible. You now expect to create many >> unnecessary entries, which is not really needed. This is opposite of >> what we try to achieve with compatibility lists. > > Just "qcom,hfpll" is not allowed by the bindings. Okay... sentence is correct but how is it related to the driver? > The problem is that it's actually unclear to me what "qcom,hfpll" was supposed > to be currently. It was added originally for MSM8974 and friends (see git log) > but then is currently only used by QCS404 while in QCS404 downstream msm-4.4 > (I think it was 4.4) I see different driver data than what's here. I discourage from using generic compatibles, because their meaning is too often fluid, but if we already have it then: it is supposed to be whatever driver and bindings defined it when they were added. > > So I wanted to just move what's used here to be qcs404-specific and then in an > upcoming patch add a msm8974-specific compatible with different driver data. > > Also wouldn't the "don't extend driver lists when not neccessary" mean using > something like "qcom,msm1234-hfpll", "qcom,qcs404-hfpll", "qcom,hfpll" then? qcs404 and hfpll are the same aren't they? Then why would third compatible appear? > That was kind of my idea if some other SoC can reuse e.g. qcs404 data? If any other SoC wants to reuse qcs404, why that SoC cannot use hfpll? If hfpll compatible is not correct, it should be deprecated, which is not happening in this patchset. Best regards, Krzysztof