Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1031211rda; Sun, 22 Oct 2023 23:14:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IES1CFk6DPQj/4zSCdl22fJOal3Gbg4Kt9xoIQ+dIjy2WN5cQkdJu2KfjMoqhpZXG4riEl1 X-Received: by 2002:a17:902:fb03:b0:1b8:8682:62fb with SMTP id le3-20020a170902fb0300b001b8868262fbmr13106228plb.4.1698041646177; Sun, 22 Oct 2023 23:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698041646; cv=none; d=google.com; s=arc-20160816; b=VLX8wH+p1vOzs3vINcHkEncFd7EWI0ulacYYop2+3BVpiFXgrkkwIa/d2QHMrDLfs6 pFQY5tpHD6s67189bwU1kFvJj0lRRaULp/SLPLJUgDeM19PYdXHZb9JDrWP3ld/Kq1AK hYMpjIOfnXNzdZujqzQnrqRbp+J9AdVkPffD+hZBJEXtiTtv1T6+aovDjEjm6Z8NaGuq ovVP3Dk1PTNXy44zAteHvsWh+QbyfBBOJ8xReGqvpiBoRMWxW53WLwvXbCweIoxSCTsJ za0ITYDgpdjRphsJxlyR9Ou2dO+wRwDFDwUm/GYYwGz82YtXFXeZdOuSvVlg3ZRJ+oJI 5CJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XFUTI4lp00DPSq7wi9wUoTFjnu048dYJkFm0nrQKYCE=; fh=I1mXq9C/+2VAhwOcVjv69R3q95XGrzWoy4QDug0Uazw=; b=XQ7gpOu8a94trXLwPpWjr7cvMEKAJJiWnr4jgdLdXwGmEK9tUBHAJXoI+BNJHuLqtU tuBtKZi6lwHF3WwyqmSoZ7ulnM2mv/HGiVT7hfvKPgVwltCTBagu2jYL218zeQk2f/T6 ksdBIE96m7U9Vw0SBB0R6Ryb8yH0IL3IpWeoxsTdq1D9qJ1TkLJbXbKNlMt3fI/DB6M+ jTWEgrnwTCPImNHgWCmLHSIvZw2RxpHUJdVBvfU8GWOOff6Ir7RCIduv8onVi4f/IdLo j2JFXFAIJM4Kah6P/fDpSwN/I/2tAF1o4ct963NDjv7iJIEUvq673IYWluK47CEC0lb+ j8aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S1MBkPNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r18-20020a63ce52000000b005b896f26b15si2963082pgi.268.2023.10.22.23.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 23:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S1MBkPNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 06BA3809E73F; Sun, 22 Oct 2023 23:14:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233306AbjJWGN5 (ORCPT + 99 others); Mon, 23 Oct 2023 02:13:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233322AbjJWGNz (ORCPT ); Mon, 23 Oct 2023 02:13:55 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ECB9D65; Sun, 22 Oct 2023 23:13:53 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39N6DTKm008903; Mon, 23 Oct 2023 06:13:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=XFUTI4lp00DPSq7wi9wUoTFjnu048dYJkFm0nrQKYCE=; b=S1MBkPNrGFwlq2tSXpl6SLUaDNc7JKyMnfDdg94nIgaIxEYujQkv9N4ShNU9Vr6y5R6Y LjAMNsG7IzySMYAW5ONzTOKn86ei/IHuUmdsfylibzDKIN99p7P+xnKevNcGERDv9krc C8sYnTHBivievszMuoMautrCJKWB8/Me94kV634NDnwNbym88otIqsmqNw46ireOiTVb 1AACDSP2lTrDRxrCMNr78LbYSWEZH1D8AsGXIVnz7MIwHb51KX6hch5v88cFAgegKGrD RDlVN3UJeMw/fXS1Pb0yYwBI+YMiqijxEglxZsbG49g/B1V47i7Y7mEJCkuKE8FEwQ3+ tA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tv7dq3jxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 06:13:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39N6DSfY014103 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 06:13:28 GMT Received: from [10.216.48.174] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Sun, 22 Oct 2023 23:13:19 -0700 Message-ID: <4fe37ae7-1d72-5404-a9f3-ec4b1b51358a@quicinc.com> Date: Mon, 23 Oct 2023 11:43:15 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 06/11] iio: adc: Add QCOM PMIC5 Gen3 ADC bindings Content-Language: en-US To: Jonathan Cameron CC: , , , , , , , , , , , , , Lars-Peter Clausen , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Luca Weiss , , , References: <20230708072835.3035398-1-quic_jprakash@quicinc.com> <20230708072835.3035398-7-quic_jprakash@quicinc.com> <20230708161259.7af17fa9@jic23-huawei> From: Jishnu Prakash In-Reply-To: <20230708161259.7af17fa9@jic23-huawei> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Z1KNR4PDochP21ueopLq3W3I_DSTjFUX X-Proofpoint-GUID: Z1KNR4PDochP21ueopLq3W3I_DSTjFUX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-23_03,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 clxscore=1015 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310230054 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 23:14:05 -0700 (PDT) Hi Jonathan, On 7/8/2023 8:42 PM, Jonathan Cameron wrote: > On Sat, 8 Jul 2023 12:58:30 +0530 > Jishnu Prakash wrote: > >> For the PMIC5-Gen3 type PMICs, ADC peripheral is present in HW for the >> following PMICs: PMK8550, PM8550, PM8550B and PM8550VX PMICs. >> It is similar to PMIC5-Gen2, with SW communication to ADCs on all PMICs >> >> reg: >> description: VADC base address in the SPMI PMIC register map >> - maxItems: 1 >> + minItems: 1 > ? The idea here is to convey that reg can have multiple values for ADC5 Gen3 as there can be more than one peripheral used for ADC, so there can be multiple base addresses. I'll try to make this more clear in the next patchset. > >> >> '#address-cells': >> const: 1 >> @@ -38,6 +39,12 @@ properties: >> '#size-cells': >> const: 0 >> >> + "#thermal-sensor-cells": >> + const: 1 >> + description: >> + Number of cells required to uniquely identify the thermal sensors. Since >> + we have multiple sensors this is set to 1. >> + > Defined only for the new gen3? If so make make it false for the other devices. Yes, will do that in the next patchset. > >> '#io-channel-cells': >> const: 1 >> >> @@ -71,8 +78,8 @@ patternProperties: >> description: | >> ADC channel number. >> >> + qcom,adc-tm-type: >> + description: | >> + Indicates if ADC_TM monitoring is done on this channel. >> + Defined for compatible property "qcom,spmi-adc5-gen3". >> + type: boolean > Enforce that in the binding, not via a comment. Once the binding > performs that check (set it to false for non matching compatibles) then > there is no need to also mention it in text. Will do that in the next patchset. > >> + >> required: >> - reg >> >> @@ -213,7 +227,9 @@ allOf: >> properties: >> compatible: >> contains: >> - const: qcom,spmi-adc5-gen2 >> + enum: >> + - qcom,spmi-adc5-gen2 >> + - qcom,spmi-adc5-gen3 > Side note - it's fine to have a single element enum, so you could > use that option to reduce churn in this set... I think we can remove this and instead specify properties explicitly for qcom,spmi-adc5-gen3 too separately in the next patchset. > >> >> then: >> patternProperties: >> @@ -299,7 +315,7 @@ examples: >> label = "xo_therm"; >> }; >> >> - channel@47 { >> + channel@147 { > ? If that's a valid change, then it looks like a separate fix. I think I can avoid this for now, although it would be needed if this channel number was the virtual channel number made by combining PMIC SID and actual channel number....maybe we can do it in a separate fix. > >> reg = ; >> qcom,ratiometric; >> qcom,hw-settle-time = <200>; >> @@ -307,3 +323,80 @@ examples: >> }; >> }; >> }; >> + >> +#ifndef PM8550_SID >> +#define PM8550_SID 1 >> +#endif >> + >> +/* ADC channels for PM8550_ADC for PMIC5 Gen3 */ >> +#define PM8550_ADC5_GEN3_OFFSET_REF (PM8550_SID << 8 | 0x00) > can we do the naming for the 0x00 as per Dmitry's set? That is get them from > qcom,spmi-vadc.h > > https://patchwork.kernel.org/project/linux-iio/patch/20230707123027.1510723-2-dmitry.baryshkov@linaro.org/ Yes, will do that in the next patchset. Thanks, Jishnu