From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 679564399DA for ; Wed, 22 Jul 2026 18:19:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784744370; cv=none; b=shszKCdYkdRQER8ZAM1Eeb34cCw+eusa+utwlgIxZw1LQBnyZh8o/h/SF4rkOdIU5IUotYVGM3saihAVKAtzUjzYGdN9WOj4Mx+0VJmv4xu+d5tiI/2yrHSfp1BrqHX6tVnCPlb1uR41NyX9JqOXOXzuXAtEZkIrOrEBU6a6NyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784744370; c=relaxed/simple; bh=h9KLvKhk60wBGwe7X2Kpn4tVz7qaWBCBWsRClzb7DOg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SPNX8pvfZZ0K/LFYX9+3RQkENe38352BQJuok0VKotlBM6ToBMq14aXFfcg0mIRKmUZr3x6btwO5uKQ3SWF8ORLM/TyklTjneFLpAteY2XfotA7WAecXW/mG+OD207UbaTcc9oz1XA9OT8b7YQrTmUQlnmEgqKzoI4yjvUcSd9A= 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=kFmgGIgy; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KGlBuvfj; arc=none smtp.client-ip=205.220.180.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="kFmgGIgy"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KGlBuvfj" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66MHrB9m1650284 for ; Wed, 22 Jul 2026 18:19:27 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= SKbgS0N/CRAlO5dvnweSF5hTUngsf8UTKv2PHTmbOF8=; b=kFmgGIgyTTnu3g4J QX/XwcbLHZCQy0lVElgeHDP0QIRCH9tb2meYXOaP05BogeReg+vVJrXOWNJytY7P KDNkbYz68jJjFGumx3ekIdQ0176FhyLh7czPCk4iKOEPLzQKr5/6E8rqmqYdmzCp bKHpomqBTOlSGIPRzhylXH3rVsSnl3xxc7aYGL9J8WcHeZGuLYxbmmr3HuyEV6va 4q+NZdw8mJRLzzClol4tPZk6AjyhdWImMC7h3B0pcAG6Cib7n96uZX4zL1AQWNA1 PDyX1BgInUzk5Ghe+3AsQ8VV7KWdHksy+OkM32dqgs/uuJjzvfwS7xlr6EoP7+Ax 6lrcWw== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fjpxdkdbf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 22 Jul 2026 18:19:27 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-cb733fc5024so6002989a12.2 for ; Wed, 22 Jul 2026 11:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784744366; x=1785349166; 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=SKbgS0N/CRAlO5dvnweSF5hTUngsf8UTKv2PHTmbOF8=; b=KGlBuvfjKCr+wEEUs67oZNR6gYqCULfIHngnNMsnZu3QLjdHxTZyNjRS/dWPcQeL2G d8CiyOZp+I34Kwb68cMaoLQjxaZbeoA29eRuT0n9szqMPR95+w2/qxjjXEr6hmDAGxnI MtvYgQawttUpKyrATgMw+q/d9gFVsPc6LfK6sDgKJjiMHNgCQe8rGjCHe0Eymz042d4R +Au5JiQzN/u9LVV8si02q+PfJ6xGhLYfcR2GLH/V2STNWvOB3bkEoAPbzLcgkFfYf/GI aFOrEK13INcKvPnxaJkxkqmpsxB+h6aaC28+6RStZcX+RO0XGacABQ2XeChGOzyKfKU9 35gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784744366; x=1785349166; 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=SKbgS0N/CRAlO5dvnweSF5hTUngsf8UTKv2PHTmbOF8=; b=eXvfto/FiX7gIqG8bRbTOwJpIrlIUxuGu6BMMRNHhclKwsemBWQSaT6OlO+u3GhCJH kA5w7NYpqn4s72Zvt/TJQtkDE9A0S7mwzS3j5MQR4YdqRut7oscPh0ShQaL/7zxtF5+p wZD/+INTY1yPO3cdpSN5NsevmWlCQ//hAKO/GCrY+947vT7TcPCcx+tcVvikmhj+lhL6 Teh2ZtDXVzEkBtLVzfQkWdSFGj/tYePIzCdQBJaVbgfa/7onSZC9BJSFeMzalpD/QIAe d7KmLJMCuZ5zU1gcN3R3l77Wl2M8/vWEbAusTpGbEvJBE8tg4FGCjYMzYI6nefQSl+I2 Qsgg== X-Forwarded-Encrypted: i=1; AHgh+RpR4oagPfSwPo6Yup8qCzwQmWFXwtiYSrghs4LXzrM4e2GfGLyTlWAH++hr7/t8DL0DZ1VoUCG9pg6LBH0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy819srlqazlBT5nNHHvEOIKAuxfo11FRp5fUkXclvr7vhNjrqi jb+qHRHSFUQ2uBSJ/702AKkoCF2AnbPB/6w1FdAI8n9r/dhsTLvnvbXr5/VEGiu4/FdlA9MN9nv wxfr8vJ0aIbqP2+R0xx2JnJt/nCIw3Nh7c2AGIqXgOLXtfNigASi8oFxEgIz4bCWECH7vh+R2Y3 0= X-Gm-Gg: AR+sD11QpNq1PI1K981UKMfNzacAWFE/m+gcthTxg/PdeijX9ScF3PgKTrMMWxz4LP1 ajBuRWMsGDJnkDr5ar3YwwDRmHOsWcRaiOEoH/YDZSpN9PjWnB57p0YTfg1fgxi7icQfnQl934s IzN05qXlH+jd4v5WdtuZpmUjOyrec9FzC6hDL6wu6IpbgMuwMtR95LmwmCPx0KBnAxt9xPHSu+e RUf6AKTCnJsYFa9k6ZYxxCKUoR4yWemlNCvFmJIepYb2QuJ/s7XC6GvPcDLrmYsMlQXP32Tq+Em 6ONii9A8uYlj8r+td54rXvYvLV+lDDaTmsDwCNtzlO84DEnm2edjXjNw2lqQZmudy1Z1ulkKRsr +cUJXhTWwysLyFV+myMrb7Y9hhnC4TTZB X-Received: by 2002:a05:6a20:9145:b0:3a0:bc61:62e6 with SMTP id adf61e73a8af0-3c3ad66828fmr26270280637.8.1784744366193; Wed, 22 Jul 2026 11:19:26 -0700 (PDT) X-Received: by 2002:a05:6a20:9145:b0:3a0:bc61:62e6 with SMTP id adf61e73a8af0-3c3ad66828fmr26270228637.8.1784744365633; Wed, 22 Jul 2026 11:19:25 -0700 (PDT) Received: from [192.168.2.3] ([49.204.16.42]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13d130a87e9sm7813501c88.11.2026.07.22.11.19.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2026 11:19:25 -0700 (PDT) Message-ID: <24a0ac2f-792e-4296-949c-047d9ce1c1f3@oss.qualcomm.com> Date: Wed, 22 Jul 2026 23:49:18 +0530 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 v2 02/10] hwmon: Add Qualcomm PMIC BCL driver To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd , Bjorn Andersson , Konrad Dybcio , Daniel Lezcano Cc: linux-hwmon@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mfd@lists.linux.dev, Gaurav Kohli References: <20260722-qcom-bcl-hwmon-v2-0-febe2805e17b@oss.qualcomm.com> <20260722-qcom-bcl-hwmon-v2-2-febe2805e17b@oss.qualcomm.com> <373bd00e-bfcd-4f6c-b64e-a707af01417c@roeck-us.net> <4f2d9c51-1059-489c-a469-562ec52015da@roeck-us.net> Content-Language: en-US From: Manaf Meethalavalappu Pallikunhi In-Reply-To: <4f2d9c51-1059-489c-a469-562ec52015da@roeck-us.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIyMDE4MCBTYWx0ZWRfX9datknkiDUAS 7REGZql6Z/wjcxUc2NleACuUSZUiKfOhIARfbfKuOeCyD8bWgk2mVd1uhiKexTtPZlc0OmYUhuT p/vTJxtJwP2YUFRKTF4FOp56gPgP46adHLarm5wkTZmgBZTyipgtHSbzeMZedC7uF75rLUezf4X oOxDsbQt6rq1+whq7UzOeJ+VSfNRCY59W2DMSd+QnRL98yukIENc9B5I/147Sm8leKthRPpBsJO VYbtdskdVlyX/H4Cf3rQKFjekB7UPPfue4tCVl+5T00u8ZU9aMycqHQkoSYKdDGlcSR1b/m5YqI Qk06+OdytyVQPvn/5vq5JoXiOtZ8IINUeBlTpSC0Fd1RKVOcYasF58+WqkMU1TDNqeSjokMRCEY tldguHlC5ixUSSTdwfsKAxjhkS7MJozxDG9wRUGuIxzFeZ7kr2tgmT1J2DgOs8Y0Ah97wEZN6kj LGcBS4tJIrhSDCjJD1g== X-Proofpoint-GUID: 62JC1fxSYYX8c8LUScF5MjD17cS5coVC X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIyMDE4MCBTYWx0ZWRfX0JOaIJFP8OfS fkMvr3Xx2LDIOfuTFZjjm5s4KmZR22m3jObsdFa/kSBxaN8PWXnoKDp2YzuPyu59mPe3oHivX/U eaU9aJfqCZiKWMdUZilOHIo26E48W20= X-Authority-Analysis: v=2.4 cv=b7iCJNGx c=1 sm=1 tr=0 ts=6a6109af cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=BvtW7Q8lqb1UdYndl6lHrw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=e4paWlehE--IC7SGyJgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-ORIG-GUID: 62JC1fxSYYX8c8LUScF5MjD17cS5coVC 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-22_05,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 impostorscore=0 clxscore=1015 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607220180 Hi Guenter, On 7/22/2026 11:16 PM, Guenter Roeck wrote: > On 7/22/26 10:38, Manaf Meethalavalappu Pallikunhi wrote: > ... >>> >>> I am curious: Why not use static initialization and use the is_visible >>> function to determine if an attribute is visible or not ? >> >> ACK. There is already a comment in v1 suggesting the use of dynamic >> allocation based on the available attributes rather than static >> initialization. The intent is to avoid having to perform enable flag >> checks in multiple places. >> . > > > You lost me, sorry. There is only a single is_visible function, > and its intent is exactly to handle situations where some sensors > are not always available. > > What would be those "multiple places" ? Understood, thanks for the clarification. I'll revert to static attribute initialization in the next revision and use is_visible() to control attribute visibility where needed. > >>>  From the earlier exchange I had the impression that there is a large >>> number of current and voltage channels, but it looks like there is only >>> one each. That doesn't really warrant or need all this dynamic code >> >> Yes, this hardware only supports one or two channels (voltage and >> current). What we discussed earlier was that each channel can have up >> to three threshold alarms (warning, critical, and emergency). However, >> the hwmon framework currently supports only two limit alarms for these >> sensor types. I have not added support for the third alarm threshold >> in this series to keep the initial driver support aligned with the >> existing hwmon capabilities. Once the basic driver support is >> accepted, I can queue a follow-up series to add support for the third >> limit alarm. >> > > What does that have to do with attribute visibility ? I was only clarifying that the channel count has always been small (maximum of two channels) and has not changed since v1. The earlier discussion was primarily around the limit alarm attributes. That said, you're right that this is unrelated to attribute visibility. Thanks, Manaf > > Guenter >