Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2394271rwl; Thu, 6 Apr 2023 09:35:39 -0700 (PDT) X-Google-Smtp-Source: AKy350bdvKPVkv61p9WlwObwY2DwVmnX5om/RQE2r+3ex2UY8Uynp23Hzq245SIrE41Qnbao8cgn X-Received: by 2002:a05:6a20:898f:b0:d9:a39d:2b77 with SMTP id h15-20020a056a20898f00b000d9a39d2b77mr199413pzg.1.1680798939193; Thu, 06 Apr 2023 09:35:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680798939; cv=pass; d=google.com; s=arc-20160816; b=yyHE3lhnMxDrH0naMXYr+Ln7hdw/zkWM+tpsNQFA2oGRZgbKlFsUajiSQs/nBTOmGg PBhPo5CM/x4A0yn5Eh22s6Q3+XXxT+uvKG4/r2ONNxWZs1NZ28x+LhXj0MBATnzK+IRI yB7tBAOS8+mp0fvgC+84CwwCX6Qbd3pN0VsjcQ3Y7QeiAzrIAZQ/i6Ci8+4eJawIYdt0 Xm8RjxtHqqTuk01lYW5kwldnjGWFC4JqI+hwrxT/CcpJuHI9rc/+zkn1diX3BBGQazQN 3zx7smwPk4R9f6CFFXKbmnVH8toS6fi39iKjU5tNvVVHYxvHj19U0vmTR8mHy6JaQ7Cf vQ1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=Vw4gdqbJKdMok54e8g7DKDgQNtZkkehkhlVi7foHU+g=; b=zrWijWs+SKw7FbD0ZBL5iT91SCeyui7PFKU1H/MUAeplZ3mV40+gmMA89/40qtjlzh ZPx1hilATukP74XD3d51Gel34N+zz3MIejYmbEH9wEb29juHAij8Ya9tWEoMGjE65mUL +Nh/jbP4k2Zv3/DBVyaq9y6ktZlMV3i6hjLJVa/OowcHHUcrEazvooXa2Wu4ptz1h+pV wM2cLOb+9D+l9RFzoONDge4fk9UnuD6c3CLLOgh5P9ipz6bmAKK4XnFdaM4597lzwMZY 6bFHtB6wzhOoPDP6TUpxEN50NkWv96F+v096e0x3forTVHscy+R1JtxUnF4xlnsbNXDb pr4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="myZG/n3N"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=bofcmuT2; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a656855000000b004fb1be8cd41si1664380pgt.152.2023.04.06.09.35.27; Thu, 06 Apr 2023 09:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="myZG/n3N"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=bofcmuT2; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239398AbjDFQXt (ORCPT + 99 others); Thu, 6 Apr 2023 12:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjDFQXr (ORCPT ); Thu, 6 Apr 2023 12:23:47 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E3112D4F; Thu, 6 Apr 2023 09:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680798040; cv=none; d=strato.com; s=strato-dkim-0002; b=O1eesfxqteSKiIdr2GdIoTQmvbnxBEZzVbYH3n/Q2TR+HeUHpXtKT0xXSMTLmtn1Pk GarPy6GAiYdRPnxUl5wr7kp9uGNfn6r5QxcKG+9R58bhVnPEHXtr4hQibJ6I5h27V3r5 6cwc6G+2KfbNV06tDQY06rzTeYATLLVFpiGhupU3/58lfcYS6pAXayqYzkiNo3t6dKhj VbjYgdsjvJlPCinLVlERgM6GnCTG6zC5LaE53fSp+oNcuDAhfae+9TPLiT9zS+uELpk5 dxqcXr7Er5MqehNSC1ph9jr11qk7NzgdBHDnIuEqNWK0In3oEVgURfONSFkEF7j1hVo/ D14A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1680798040; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=Vw4gdqbJKdMok54e8g7DKDgQNtZkkehkhlVi7foHU+g=; b=n5AX6FYxB1JPMablvoSoi7/9F/BPIJOOxTdR2Gx+g4caYY8V4OLbmG+vRGxW7IIefq NB5h3a5fijWwjIpcM1OL7uN0UgYA2QwuFTIrxtpxxhTlkNSClyO1LTiO95YH8qRU6y02 +rFuYaYRd5c1h7jlFEbiPe4UGUsuHnag/MzqFyZ2YwGj1MjBWxPuLs8kQkqscctJD1W9 n5m1gk15M8rbWwKPJiKqnrPDhS6e4LhwOWNtPmB3zpqbys2FlpP/fPUenDHoEd06xRqN 9zGxQo5Xn0qZzd4QT+i/1j+meZUUkN9rm1rZeuF7w5EX5THJ6h53GqPb41YnZ63dXxAr od8w== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1680798040; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=Vw4gdqbJKdMok54e8g7DKDgQNtZkkehkhlVi7foHU+g=; b=myZG/n3NFrX4nzinQGYqeHFty+m08R2G/NQscAbO5NCbu/ZUIY2Z8XrS84YHee6oqN BJ+3kWqqSExDKFPB2TT8sIxbDj5LnEWrsI0QhSxSDVrQ0ruATAqVAA8unl3rJMEVdmjW AVWzGvtMQJQlbPnaVIldz/cEk6NRY36MIYfgazJfHvNLagYNFdGcRIqT5CPPro5w+soW TncGA8XnB+kGJ3pDbzyNcG8EVK8hIaWWoXll/+2h/3XI3A0X1VtQamaQkQ23hdX8QG+w qr8nKM5pi5yqQLSRDwGP6Nz32maFDhxu22uQRzuO41OOnvRHSLpV9/qj8xLEdKL1hCL5 9mpg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1680798040; s=strato-dkim-0003; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=Vw4gdqbJKdMok54e8g7DKDgQNtZkkehkhlVi7foHU+g=; b=bofcmuT28wdvr6bdJqminyaXU6o8KqKkU9MyaggOh6qaF00DKPiSMqHaXNiZlG5RWU ve34xN05362IIbTzJ7AQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u261EJF5OxJD4paA+pvh" Received: from gerhold.net by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az36GKeD11 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 6 Apr 2023 18:20:40 +0200 (CEST) Date: Thu, 6 Apr 2023 18:20:34 +0200 From: Stephan Gerhold To: Bryan O'Donoghue Cc: amitk@kernel.org, thara.gopinath@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, dmitry.baryshkov@linaro.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] drivers/thermal/qcom/tsens: Add ability to read and shift-in non-contiguous calibration data Message-ID: References: <20230406145850.357296-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406145850.357296-1-bryan.odonoghue@linaro.org> Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2023 at 03:58:47PM +0100, Bryan O'Donoghue wrote: > On MSM8939 the last sensor has calibration data that cannot be extracted in > one big read. > > Rather than have a lot of MSM8939 specific code this series makes a generic > modification to allow any other calibration data that is non-contiguous to > be extracted and recovered. > > For example s9-p2 takes bits 1-5 from @4b and bit 13 from @4d. The bit from > bit13 then becomes the sixth bit in the calibration data. > > tsens_s9_p2: s9-p2@4b { > reg = <0x4b 0x1>; > bits = <1 5>; > }; > > tsens_s9_p2_msb: s9-p2-msb@4d { > reg = <0x4d 0x1>; > bits = <13 1>; > }; As far as I can tell the sensor with the non-contiguous calibration data is the one with hwid=10, so do you mean s10-p2 instead of s9-p2 here? It's easy to mix up the numbering: Since hwid=4 is missing for MSM8939, the sensor 9 in the calibration code downstream (TSENS9_8939_POINT*) actually refers to hwid=10. hwid=9 is sensor 8 in the calibration code (TSENS8_8939_POINT*). Sensor hwid=10 was disabled for MSM8939 in the tsens driver because it seems unused, only exists on MSM8939 v3.0, and specifically to avoid having to handle this non-contiguous calibration data, see commit 903238a33c11 ("thermal/drivers/tsens: limit num_sensors to 9 for msm8939"): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=903238a33c116edf5f64f7a3fd246e6169cccfa6 > On msm8939 last (hwid=10) sensor was added in the hw revision 3.0. > Calibration data for it was placed outside of the main calibration > data blob, so it is not accessible by the current blob-parsing code. > > Moreover data for the sensor's p2 is not contiguous in the fuses. This > makes it hard to use nvmem_cell API to parse calibration data in a > generic way. > > Since the sensor doesn't seem to be actually used by the existing > hardware, disable the sensor for now. > > Fixes: 332bc8ebab2c ("thermal: qcom: tsens-v0_1: Add support for MSM8939") > Signed-off-by: Dmitry Baryshkov > Reviewed-by: Bryan O'Donoghue So with sensor hwid=10 disabled, I think this patch series is actually not needed? :) Thanks, Stephan