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 C2B773D9DC8 for ; Thu, 23 Jul 2026 19:16:22 +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=1784834188; cv=none; b=nVzPN5ecnpTy1EUWWpvE7LlwgQWCJALpctqvS5m4I/N8twZAQjNefBeWMoR37DNsOgFchlbW0ZesXuagBv74YhHtWFvXNUYKEdRqfEosMVv7iw7E3GImq48Zj8zWQqRgUzOT6ZnpAX460ev9g/E+ANqSi1RKTwFjbrXOeYo/fm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784834188; c=relaxed/simple; bh=asxDQ6fQtq0+zoBrpTtg4hSVuljD7ouxIXdiKSHzxcQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cd5WUdYRAtxTwDUob9BXU9mntgehWcqcRVFlkmJvjFDxUxSzKvxh8vFB9sBueMY7w1E9IDLhcncHiD4mHS+t8EvO2YH9h5MbD4Y/Rs7VomFCVHLKphOJbmGIbHWI1m5Bqz+98iT6VpskK/a19WZDZGU3xTbAoMP0m4RbZXabb8g= 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=j8YM4+5/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VMt+lrpx; 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="j8YM4+5/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VMt+lrpx" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66NIm3eB224082 for ; Thu, 23 Jul 2026 19:16:20 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= +YmIG/iZNAmovLkMBYqbYn5P4DPYWwSvMf5WH1pV7/Y=; b=j8YM4+5/mxhtJZA/ Fw7grVa5EXsQG9wnVw9HnY/SkxNvYuRc+KqREeqWrcAbdrgMwtgUlreKPlhKffSe QOdGt9Po7AW6PQhp2dL96ei7Wfqo4PvYz1j6CncO9SHhGeGCIM3m7tf8/KxI3BpU GvVrcq/FHHJPplYmVe9EvbkhfttV4pURzXDt0sSGGq4hbhEPKL0Pd+b3SSektTCI m+6T4DRiG7MV5i16v5NqXKGtPLT3+llMwFHZyCSHctzuPITLA6aCnzrDhKOc8W11 JLn/W0OJcSzxD3Ex7XSd3M51TGMEGaXcJG55m404MdQ5QiDFkhTQEanX+ZorN+/p eubtxw== 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 4fkeuqayyv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Jul 2026 19:16:20 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c892143db7fso993805a12.1 for ; Thu, 23 Jul 2026 12:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784834179; x=1785438979; 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=+YmIG/iZNAmovLkMBYqbYn5P4DPYWwSvMf5WH1pV7/Y=; b=VMt+lrpxv1soFVh/cvDopZzSBOIw9Nrn4NfQVPNlT1wuQlyM9rgsvd/DZQfi/y1tEa 6YqxHEqN7qGV8KlAqgWGOBc2moinph0krJnxtfA1TH1KlpxyU/+m+RXia2gKLd2JYGAN du5MmuqsF8PDei0ZIOz8Uz0eu7BMnuoRN6zHc/Ue0qvBsDxfBXfNMQov7VeuZQGq1sUs fp8MO1xAoecVXOgFjeX9diBWr5GJHDdJGOnQMRpPYgvv/VGua4CqqoHS1Hxhmj2c02Gu zoZBXfoq7Word9GaojBoHiVPxAMsHRSNA8mSQUnyOc4Gvs45edz76UI3L+icXcdBIunI YH0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784834179; x=1785438979; 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=+YmIG/iZNAmovLkMBYqbYn5P4DPYWwSvMf5WH1pV7/Y=; b=Fh0cFF9yKxJV6BSoAyKxrgEHP3Hsgx1mCXVEGc6wHad9IgwVMIUX45VrlzmxrxcV3d iQhMMEzq0KSizatQ3rJ5nvhU1BhpuLo1cLqwRahj3QjlBhJFpizgH/PqzUbkfMNGCYyG SAkQ2Zo0ER/sthT+GGymyiUNhIiClyXWXYj91WAq1GLJ5RgV9++loOOCwXt1M+vyLhRT 3QZfah1dJwysXc9U6soIDWuqHJsxVbPgVR5ttdc/GfWKYs18oFd7CZswarxdY3ll+36i UCg6PDLrVGP18lAqnXfalD7H4VwD3MjZeJjAWPP1PfwYfBH9tHnmMLpGJbxdO6FH9ShQ cOGw== X-Forwarded-Encrypted: i=1; AHgh+RqJPhKVrBKX2IXUCDP34Y+Bwjhkh6To5I3/kuKZLZw86nB7mXTVXDHxlK7RbTIAa8TfEpN+A+H6G681Ih8=@vger.kernel.org X-Gm-Message-State: AOJu0YzJoQG8obb8nBf5NPjm0x1Np8IDbRuNHKhcGgiPLEWvGXEwvm6D vvxkwqG6bUULXMRrY4ZVbbhM2hVwWkw8l/I8AmcTKURyIPtOEdMcsduG9/whlOqc5eKDEsSTbQL RX/p22VulH51VDecYgQMzH+W+Hb21/whzit/M2/jzl9baUFNbTOLQE+ZZuk/+qEBkGBA= X-Gm-Gg: AR+sD10/4PAApZzvtVy9vA9y2CsHGa8A16ocCSBAknHfF/hiw++vbV3U4rtR0kcsN2R 5mPwjzkc0ikQA2q8SLGVwcruiNZVnTFxDeqGeRj7qpVLnqK9Z6aAsbRsHb4RWh/PPip4oe38Msj tIws3dBRuXMGOk0vftk2b07fXskQeoa/7B/MmVDjgUOYi2oUqCPegYk+a4AV6ESXgEHXB9HM/XT K0M3ynDNjbTJeOE5LowIQ63EK8KB3mSiA3V5JTWrUuO85IGT/8MHXxHfX6/fJADUXQrWHtWer5/ Z1oaVZW/wEoIXxITvlGRfAuLfhQRTU8Ew/tJJvbvMX/KpujXc4sV94efBADNnkHddJ6G8PviZfq GtueqH86kSGGovbZFay2O4JftqFWREyx/ X-Received: by 2002:a05:6a21:103:b0:3c1:d78:6457 with SMTP id adf61e73a8af0-3c44b02ea57mr4433553637.32.1784834178842; Thu, 23 Jul 2026 12:16:18 -0700 (PDT) X-Received: by 2002:a05:6a21:103:b0:3c1:d78:6457 with SMTP id adf61e73a8af0-3c44b02ea57mr4433501637.32.1784834178262; Thu, 23 Jul 2026 12:16:18 -0700 (PDT) Received: from [192.168.2.3] ([49.204.16.42]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3147e070538sm22149978eec.20.2026.07.23.12.16.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2026 12:16:17 -0700 (PDT) Message-ID: Date: Fri, 24 Jul 2026 00:46:11 +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> <24a0ac2f-792e-4296-949c-047d9ce1c1f3@oss.qualcomm.com> <3635cd34-4c11-40fe-a9ff-48b752fb5150@roeck-us.net> Content-Language: en-US From: Manaf Meethalavalappu Pallikunhi In-Reply-To: <3635cd34-4c11-40fe-a9ff-48b752fb5150@roeck-us.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIzMDE4OCBTYWx0ZWRfX600kY+/yEbAk /EPwPYz5iNJYXlHCrZkd0SZsR5Zk29/E2C7GD/Tz2h4fSzDI2cZ2mE3g/k4UvlU/CMRnGEwssKq T2oDBFF/S5++Am7ftvm8gndGzO7oh8Y= X-Proofpoint-ORIG-GUID: 1wT_wctJd8LZSkUq43B9krHZ7sbiwfho X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIzMDE4OCBTYWx0ZWRfXyPy6TzWB3rCh UEo5/leLlvHnMnhX5gsDvlA/XM+rReDctz8gm/Oyjc5ovda/QaTPl9wukeBXfGgi+hAT/z+St4s g/keXzbKOR/R78Z4xCVXVwcgYo+CvvlOfJn1Nz7qhdVmukseZ8vX9ODHMTgwuYoUOnVtEGoFFwK jYCWlnydkUUQkc88fYcDTXZ8JTgfHyGjOIFAPAtoB3CIXEZDRGmEPXcxAP0TQtvH6prsTmSNVG0 qQUUqr6Cb1lSobqdCK82KykwxSgzAvsA33hIyU+6gbkuEYBRJ/p6ONcil20U3Ja503isDB3NvJp kPhBpaLOu/3z2LVxHEKZNLbrNle8kr581/DjlPiAVOcw8B60+qX9yR1GBdNIQMiu1xoft367ouH AqnePdZMaHDUMWcsyyw6Ac3VHsTl9pTfdiuA4ztE0qE6nxkaRFlKV/c5nuOZiCixxKlJFRyBniF CdjE68eu19r+pWU9fHQ== X-Authority-Analysis: v=2.4 cv=cPDQdFeN c=1 sm=1 tr=0 ts=6a626884 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=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=_jlGtV7tAAAA:8 a=l_Mds-CbMwRO_PrwST4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 a=nlm17XC03S6CtCLSeiRr:22 X-Proofpoint-GUID: 1wT_wctJd8LZSkUq43B9krHZ7sbiwfho 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-23_06,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607230188 Hi Guenter, On 7/23/2026 12:29 AM, Guenter Roeck wrote: > On 7/22/26 11:19, Manaf Meethalavalappu Pallikunhi wrote: >> 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. >> > > Feel free to use (and test) > https://lore.kernel.org/linux-hwmon/20260722185749.2313572-1- > linux@roeck-us.net/T/#u Thanks for working on this. I'll use that change as the base, rebase my series on top of it, and add support for the third alarm level. By the way, for the voltage channel, the hardware monitors undervoltage conditions and provides three threshold levels. At the moment, I am mapping: LVL0 → min LVL1 → lcrit For LVL2, would it be possible to introduce a corresponding low-voltage emergency threshold, such as lemergency (or another more appropriate name), to represent the third alarm level for voltage sensors ? Thanks, Manaf > > Guenter >