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 176DCC4332F for ; Thu, 29 Dec 2022 08:35:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbiL2Ifu (ORCPT ); Thu, 29 Dec 2022 03:35:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233117AbiL2Ifs (ORCPT ); Thu, 29 Dec 2022 03:35:48 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BF3925E1 for ; Thu, 29 Dec 2022 00:35:47 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 1so26638487lfz.4 for ; Thu, 29 Dec 2022 00:35:47 -0800 (PST) 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=nn+L7ZFW/RK3/kCOolsV87i3HVKdOq4YpEDAmCcTxBM=; b=UgJuilLIQDUhAmJ6TlExHb682enSnsoybnVOxhzesUJ473aemV7pUT7ZOuvdzKt991 Ng0r5nSA9aMFYBrQ7bfyJGkFcixVHevpJgYRTWr8uknKzRa21ljLaayNvdyFuWPgkkYn sHS8BNcfFxz9N9ZNHFvRAB1epi97g3pniYBu7O9WxFETtYp0hB+x4LmdevPDKoJO25VO yFRgL5KxqS7imE53ybKT/4wNwLPjRlWZmyqRvQiaq/8nuEEd97EQTKvWgW/f3tLPs5+D Jg0312reonBJkcjYr5mhlCDN0CgOSd3AhqYhS8SXwngBrqIAWABey7S7cqypf/ZEKZF3 +XFA== 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=nn+L7ZFW/RK3/kCOolsV87i3HVKdOq4YpEDAmCcTxBM=; b=RkfYZV6AaxlPm8JBWOH9PkTTuMOSA2do6c05SJPGbd9VMOPBYbxLg0NSy6UMOBswQ4 I7yvfL8Kl72t3Dsn2m/KyLvMVQLETlSXxt+4obUezwqt26y2+/aj+MgO0aOHwHlNVw2H Qs02SZ++pCdbdEpYBGwmKKC5YGMHPL9ruzQa/XpdNmrPDcEjOhgv+Xbhb5a3lmPHJJeS y4bONzxVZFRi01IDyVBeOPuO7DghFAIlKidXsRN5nFQLIzmNAYf1yzZZq+OzaGmn8YRh kH7vDn6spMy/bG48yt5cORSPN71o0DqmVLh0bo6OZcgzVZ30tkTqBYGC3Y5KoSHJ9GbK /QYg== X-Gm-Message-State: AFqh2krTAR46dmQ7QiLO738VZqQtFVAbkreerG7Rui3SPChpNoXap1kh kNTNcvlbVdO5zmOcFyrzh4bECA== X-Google-Smtp-Source: AMrXdXsenEXFrzEM+P6NXUEyIR8Q04dG1lJhUB27Nv56yKOGvZGysmx5i31pwnnDdK8i0WWOkNWlmw== X-Received: by 2002:ac2:5318:0:b0:4b5:7720:5fe4 with SMTP id c24-20020ac25318000000b004b577205fe4mr8365186lfh.67.1672302945497; Thu, 29 Dec 2022 00:35:45 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id o6-20020ac25e26000000b004b01305732bsm2977571lfg.216.2022.12.29.00.35.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Dec 2022 00:35:45 -0800 (PST) Message-ID: Date: Thu, 29 Dec 2022 09:35:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v5 02/20] dt-bindings: thermal: tsens: support per-sensor calibration cells Content-Language: en-US To: Dmitry Baryshkov , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui Cc: Bryan O'Donoghue , Shawn Guo , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org References: <20221229030106.3303205-1-dmitry.baryshkov@linaro.org> <20221229030106.3303205-3-dmitry.baryshkov@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20221229030106.3303205-3-dmitry.baryshkov@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 29/12/2022 04:00, Dmitry Baryshkov wrote: > Allow specifying the exact calibration mode and calibration data as nvmem > cells, rather than specifying just a single calibration data blob. > > Note, unlike the vendor kernel the calibration data uses hw_ids rather > than software sensor indices (to match actual tsens usage in > thermal zones). > > Signed-off-by: Dmitry Baryshkov > --- > .../bindings/thermal/qcom-tsens.yaml | 95 +++++++++++++++++-- > 1 file changed, 85 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > index f3660af0b3bf..4bb689f4602d 100644 > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > @@ -81,18 +81,63 @@ properties: > maxItems: 2 > > nvmem-cells: > - minItems: 1 > - maxItems: 2 > - description: > - Reference to an nvmem node for the calibration data > + oneOf: > + - minItems: 1 > + maxItems: 2 > + description: > + Reference to an nvmem node for the calibration data > + - minItems: 5 > + maxItems: 35 > + description: | > + Reference to nvmem cells for the calibration mode, two calibration > + bases and two cells per each sensor > > nvmem-cell-names: > - minItems: 1 > - items: > - - const: calib > - - enum: > - - calib_backup > - - calib_sel > + oneOf: > + - minItems: 1 > + items: > + - const: calib > + - enum: > + - calib_backup > + - calib_sel > + - minItems: 5 > + items: > + enum: This should not be an enum but a list of const... unless "holes" are expected (e.g. s0_p1 and s5_p2, without ones in between). > + - mode > + - base1 > + - base2 > + - s0_p1 > + - s0_p2 > + - s1_p1 > + - s1_p2 > + - s2_p1 > + - s2_p2 > + - s3_p1 > + - s3_p2 > + - s4_p1 Best regards, Krzysztof