From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C0B43AEB4E for ; Wed, 29 Jul 2026 11:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785323247; cv=none; b=UyjhJf63JRHpPm5jcy0w+LCxUV8OiVvNlZWRz500RoUQGe1emNBraSZe+nmnTx2qOP+kl9zUrkS5VqA1vivhtFepBl0m6K5AbblR6Aca9EBlKerXLwPCsmRC1ZUiK/sGUx2Js4zhvwR6CCvXz5GndPU1VEVxbjbAdREn0ctsh1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785323247; c=relaxed/simple; bh=d3y7bvLW+9u7dcFhzMEPcUOpEjchimLMTHUk3emE8FQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qOWuqlXBWKXes3uq1kubo0r3879OqPqfjpIJht1fiLMDjgQkGmvP3+Cy2tIlXZkAqDd61b5iOrN4exdANf5q5SZZti51uu+EyhkVdcZDb9crNnihknRYVjkfB4kVdwDMrlnsvoVgpcfC6C2nPc8iOxgN5aYIbWBZ9iWhi+leHIs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=cpTp/awj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UnigvOPi; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="cpTp/awj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UnigvOPi" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66TB6t5A1816599 for ; Wed, 29 Jul 2026 11:07:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Jb6QOfLmqATVdsCHpt9kJ443d7h4Y5J6phU4BXwhkVE=; b=cpTp/awjkvX6Sety QSIEZMSfVSq/7ylmL6PnI9O0hejiP1x1/YyebnU21eMdCtWc7vcbw+vy942lZtfx PSVW6xx82InJ4e9kUE4fDVW0fi3KE5E8SjgQ5or9ethjAYOuAE1+i3X98KIy2iq9 HNmeXJ80oFCXm8BI1O8Mv99q36vKKWFAZ5+zyZ5i+FqbLpUalHd7n3+D+1QxTdbA sD1PzO+14S9eOSif+i8it/vFgV0Dp8cUHAa5k5u5AAeq15uyu6kHSgrwlSjTcUzp MElbi52WWMvtvwJLuj42UTtFLq11/ZrlKcEubmcTK27ss7a0xV/PjlxqIktAVadw VNOM1A== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fqe920mn5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Jul 2026 11:07:25 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-51bfa45b280so1038481cf.3 for ; Wed, 29 Jul 2026 04:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785323245; x=1785928045; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Jb6QOfLmqATVdsCHpt9kJ443d7h4Y5J6phU4BXwhkVE=; b=UnigvOPiON/dHoEMFPZoHppbfTfmWIN2khdPjcfQElxIEAMje/5LwgMMDgOMO33WhD KGiQnSdCEN3Fohr8BC69UeS7MDKcyD0xaeaIJ3Lv3MlvgrxP5LhF+mEF/Vp4/FPZWUSo aFxr9ldk1SIcSrJlTraB1BdmNjj4cw8jCsebJIto3HwT6kN99ED2QbOL60UAO2Fw55Le XYlUMdI6yvmhqs55ZWWxydfq0Uv/vFTh+GcrSP4qq+Foge8vVnqVgnvkUH/55fE0ICXq T5bhr0VF9pesCYIHYyc4WZh7ihy++G0c4N2adYushhkLu/kXxtcSPkSbfL+EIdz0h2eM HJLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785323245; x=1785928045; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Jb6QOfLmqATVdsCHpt9kJ443d7h4Y5J6phU4BXwhkVE=; b=RW0K1uOSGwaED21WkIIAKGJezhKXDxgG1raX6TAGF7P2HZUt7sN6z68eDBNX3OxLwl 5uGanZGVZAGjEm4zM+PVjuQteN09CIhumNc4RNEu+ROfaTGBphpk3FGonq6OmKzCSpcq DLUygdxvmmWeIVnSnGFZ7ukqKSPE5pYCMjU9+mMQS2APMvEuMi3HZ71ZCTFxYobcePwv BOkZh/9NTOobVxBl+yllVQ/elHig5pJSuRWnYRPBWPrFDutW+Zx74GjNAU+lCoy5emRK OVudS5OoRnpJhOFzWS0QnotJk51xS/NdcV/gXvf6gT8opM0GMQjxcA9xa/EcRlHOD3py R9xg== X-Forwarded-Encrypted: i=1; AHgh+RqQK3TszsMlWTKiQro9Jwlol8KIv4WU3zC2YrArnwgEC/YcgTozAwtKsGEh8nKww8GZ+qbBsMpgMKFtBNQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyyElQ3Qz9UWXN6Dyvv7FqH7RVASthKQ1rdNB/IDqXiKjKkT035 sFmSkR+SVagousq14l0qKHyneg/Hz7ecQ8JIePlyuyPmXeE3d481ol/Te5bLyiQNEyhbnoEn1n3 p/HbWkn1Qyh/XQS7n+4Q7HiV/VXISbXpkkUiHjVJXT6qQy9CyPnLtd9XvNaz+SZiCyb8= X-Gm-Gg: AR+sD106DeTxiLdwTBoiJeDQMHoE7sCrX7Zi/PaVLX5FMWR0IvE5RCpbZXx337YmxPl uJ+LS3Q5qZH26OBUVu4SrRIVEKvOvZNnUPgFztsHg+1uCucvaRm6j70DN30OvsXXE5428OYUG7G /WUvkKxlA7igtMObcVy+0qlQBr8L/c+tV0rkV+XDYQcd1kuNPoZkrZ9baL1AaPvm+2uAobeUebQ 8wAhv2vFG8rpz43mqL2fu1o8hbN5z4crLOUVmR3PKOvFBa1vwj7npwhCddMwZEf0c0E7AmlQhvB S85rIWIdGSzYecpU3JY2T7AyxeJ8sUuuYd1cuWDgH1yzADNWx609YLSP/JoRyLhl28vHwxl13cD 1OtGzQd/So25HINYwZJ143x1O X-Received: by 2002:a05:622a:144b:b0:51c:83f1:bcd4 with SMTP id d75a77b69052e-529df3170c7mr57667811cf.0.1785323244686; Wed, 29 Jul 2026 04:07:24 -0700 (PDT) X-Received: by 2002:a05:622a:144b:b0:51c:83f1:bcd4 with SMTP id d75a77b69052e-529df3170c7mr57667271cf.0.1785323244206; Wed, 29 Jul 2026 04:07:24 -0700 (PDT) Received: from [192.168.120.193] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1f83c6858asm99687666b.10.2026.07.29.04.07.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jul 2026 04:07:23 -0700 (PDT) Message-ID: Date: Wed, 29 Jul 2026 13:07:21 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/8] platform: arm64: qcom-hamoa-ec: Add fan RPM query and LUT calibration To: Anvesh Jain P , Sibi Sankar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org References: <20260728-ec_add_more_commands-v1-0-771abd65ee1a@oss.qualcomm.com> <20260728-ec_add_more_commands-v1-4-771abd65ee1a@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260728-ec_add_more_commands-v1-4-771abd65ee1a@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI5MDA5MiBTYWx0ZWRfX1wu/zOZca0jp cFVwRee+QUlzDh4HcV911pD8IitPw5RKiFCYGS3UXC0hILysRb/6DN9b87kUQppym6FoBeZmAna jNxfIGSLzYsAFPLIWMRGb6QHfO2X8a8= X-Proofpoint-GUID: fR9y_e9MeMK1LcYIgQk6JdvVZahz1tW4 X-Proofpoint-ORIG-GUID: fR9y_e9MeMK1LcYIgQk6JdvVZahz1tW4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI5MDA5MiBTYWx0ZWRfX5qho0Jl3x6OT 17jTjoYN949MOr+SeYrBz5TXp4a0P+WYM1vNoCZPnPQF7p7eszzR4HDzN7IguGxLeVXmGuSxoRN gkyiBH7IpTJV6HRVHpqW1/BKBMJmB23vbYS+L7bxMTNl+U1Sk1gGWTruKJRoLephKQ+KTi5+Ed4 D2U12puvaG1mvb4qZOjQ5njZHaJlPcfkQSZMczDSw2X9lGrnXbZbZ3Rg+uC3vX2BrIyN9Tg2AP+ F3sNSs9LDZq8xvhU7AMSy6P2az/7awevVUoT3jvioM/KUGC+V14BhaB6r4SkDiUDWAt3ZLoabQT 9FEjWq1uCV8FvpiX+f8gqJeQNoEP65hHd0rvCqZxWWjdRG7zozNhX5IikmGaVNjzrPHtu3z03Kb H8wEmMvBCdvPbUJ/yapdxFr0IS/gL2LvdednngFhqXWzGA1YdXYfMRJooEJyJDG3RnQ8yXMfmmb qD4ImC2PyctW7jFn/3Q== X-Authority-Analysis: v=2.4 cv=JeiMa0KV c=1 sm=1 tr=0 ts=6a69deed cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=8DESU-PLTaP04mM2rpwA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-29_04,2026-07-28_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607290092 On 7/28/26 7:44 PM, Anvesh Jain P wrote: > Add the EC command definitions and handler functions for querying fan > RPM and programming per-fan LUTs (lookup tables mapping SoC > temperature to target RPM), and introduce a raw i2c_transfer()-based > transport for the two commands, since their variable-length, > sub-command-addressed payloads don't fit the smbus block-data model > used by the existing commands. > > Fan LUT geometry and temperature breakpoints vary by board, so encode > them in per-compatible qcom_ec_lut_config data selected via > device_get_match_data(). Add configs for the Hamoa CRD, Hamoa/Purwa > IOT EVK, and Glymur CRD ECs; IOT EVK boards share the Hamoa LUT > geometry but are bring-up platforms without a calibrated fan curve, > so skip_lut_set suppresses the LUT-set command on those boards. So are we expecting every single laptop/device that utilizes a compatible EC to require modifications to the driver here? > Since the LUT values depend on each fan's maximum RPM, which varies > per board assembly, calibrate it at runtime: drive the fan to full > PWM, wait for it to spin up, and read back the achieved RPM via the > new query command. Run calibration in a work item at probe time and > after EC reset recovery, and make it abortable via a completion so > suspend can cut it short. Track calibration completion state so the > LUT is programmed once calibration finishes and again on every > subsequent power-supply-driven profile switch. I don't want my laptop to become a jetplane on every bootup. I doubt anyone does. Konrad