Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2399609rdb; Mon, 20 Nov 2023 09:42:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1kMziAsLZmE/q+7suKahUAArlpvzoQyPeTOifyl31hHBdlyAoeeTFnaIkcDvzWKgynLzD X-Received: by 2002:a05:6a20:7483:b0:188:4063:5795 with SMTP id p3-20020a056a20748300b0018840635795mr7018887pzd.0.1700502146539; Mon, 20 Nov 2023 09:42:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700502146; cv=none; d=google.com; s=arc-20160816; b=mJhiMoQ+w/AuqaV5/sjyIjW9BZd1lWXg9eYxMy1eP7t8l5djyGKKHSoXCJMBsqaBvt 4FGtM7hqTRhjMzc9BS3ZGQD0k4migUW+oyoC+M0Iizro0W2U3syGTPUTyd+J/l34ogmz fL1gfqpJI97HzXkxS7mzctdbWR87tOHybuEgL9UuztKCgWpu0eSe8TmxpeehRbCJjEcx kmMnVSicWCZx2x4P0doywM5b8zFFajWUKqr/VQb81kYkSiIAI+tQKxPfSLh4btYhX18y MtD3ikarxtK2PcoNkId174qHtQiM2LFfo/valUxKl9U6khViHz2KqdUNH914Dhe8NpyY YtGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Gyr+c/iPj+5DuSYovA866xq9zCpHqJ+pjTpuxcOIw3U=; fh=0dTuLjZf4fnfLeHHxgaJ+2QVTSifXI/UD9CCsNdHoFY=; b=Q+eH8tU+w1JqkQ8VFLV6Dlo/V7t9+AZhLmmNPNo1pACABSP8B/vSUCNqnKFMLclIZJ J8vHfthNtMDHqfwdalNj39lXZQJeXTb8AuTqV8Bi8Te9mIcN7m7KdA/9BIFIZKvHGm4h EfhOoMUuh3dUlXIcRJfM9AVsGHpvCchllGpZTU6nwhzdc1Jfpv20m5VjSTedt51DxKmU dO0XoA2w8PVYWM9usDk+6rU43jVvI/ttX/wrMFHPaliowRRzWQLXGQn13VcEbWth276G Dp5Y511Twv+FUqgAp9Tnoubkvcbi6L/ZHGDaCUAL7RcsIbfhgaYXVDhBv73XcMNB0CH2 P0SA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id pt12-20020a17090b3d0c00b00285196ac998si4408524pjb.104.2023.11.20.09.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:42:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 97DDE80A07EF; Mon, 20 Nov 2023 09:41:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234617AbjKTRk6 (ORCPT + 99 others); Mon, 20 Nov 2023 12:40:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbjKTRkM (ORCPT ); Mon, 20 Nov 2023 12:40:12 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E811BE2; Mon, 20 Nov 2023 09:39:32 -0800 (PST) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SYvqP0j59z6K9Jr; Tue, 21 Nov 2023 01:38:09 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 20 Nov 2023 17:39:30 +0000 Date: Mon, 20 Nov 2023 17:39:29 +0000 From: Jonathan Cameron To: Petre Rodan CC: Krzysztof Kozlowski , , , , Conor Dooley , "Lars-Peter Clausen" , Rob Herring , "Krzysztof Kozlowski" , , Jonathan Cameron Subject: Re: [PATCH v2 1/2] dt-bindings: iio: pressure: add honeywell,hsc030 Message-ID: <20231120173929.00006a6d@Huawei.com> In-Reply-To: References: <20231117164232.8474-1-petre.rodan@subdimension.ro> <20231117192305.17612-1-petre.rodan@subdimension.ro> <5b2e4b05-9408-48ea-92ac-15883e102013@linaro.org> <8aa11758-5eee-427b-adcb-c3578a521daf@linaro.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:41:22 -0800 (PST) On Mon, 20 Nov 2023 16:40:51 +0200 Petre Rodan wrote: > Hello! > > On Mon, Nov 20, 2023 at 03:04:07PM +0100, Krzysztof Kozlowski wrote: > > On 20/11/2023 14:42, Petre Rodan wrote: > > > > >>> +properties: > > >>> + compatible: > > >>> + enum: > > >>> + - honeywell,hsc > > >> > > >> Way too generic > > > > > > I'm new to this, please excuse my ignorance. > > > my driver covers all Honeywell pressure sensors under the "TruStability board mount HSC/SSC" moniker. > > > > We talk here about bindings, not driver. For the driver you can use > > whatever name is approved by reviewers of your driver. > > > > > that is why my intention was to provide a rather generic name for the driver itself. > > > are you afraid that they will come up with a different device that they will call "hsc" in the future? > > > in this case honeywell,trustability-hsc would be fine? > > > > > > as I see you prefer to target a particular chip, but I am a bit afraid that the end-user will be confused by needing to set up something like > > > > > > pressure@28 { > > > compatible = "honeywell,hsc030pa"; > > > > The compatible should be specific, thus for example match exact model > > number. > > there are an infinite number of combinations of 4 transfer functions and 118 ranges + one custom range, so providing an array with all specific chips that could end up as compatible is out of the question. > I was aiming at providing a generic name for the binding and get the transfer function and the pressure range as required parameters. > > > If you can guarantee that all devices from given family are the same in > > respect of programming model and hardware requirements (e.g. supplies), > > then you could go with family name. However such guarantees are rarely > > given. > > I see your point. > > > Therefore for mprls0025pa I agreed for using one specific model > > for entire family. > > > > https://lore.kernel.org/all/d577bc44-780f-f25d-29c6-ed1d353b540c@linaro.org/ > > > > > > > reg = <0x28>; > > > honeywell,transfer-function = <0>; > > > honeywell,pressure-range = "250MD"; > > > }; > > > > > > ie. specifying "hsc030pa" as driver while his chip is not in the 030PA range, but 250MD. > > > > > > so do you prefer > > > honeywell,trustability-hsc OR > > > honeywell,hsc030pa > > > > I think the latter, just like we did for mprls0025pa. How many devices > > do you have there? > > both hsc and ssc have 118 ranges, 4 transfer functions and both can be requested from the manufacturer with custom measurement ranges. > > ok,I will rename hsc->hsc030pa in the code as you requested. Where does pa come from? If we are going generic, feels like trustability-ssc etc are more representative and matches the datasheet cover page. > > > >>> + honeywell,pmin-pascal: > > >>> + description: | > > >>> + Minimum pressure value the sensor can measure in pascal. > > >>> + To be specified only if honeywell,range_str is set to "NA". > > >>> + $ref: /schemas/types.yaml#/definitions/int32 > > >> > > >> That's uint32. Why do you need negative values? > > > > > > signed int32 is intentional. some chips have two physical input ports and measure a pressure differential in which case pmin is negative. > > > see either of the pdfs at page 14, table 8, column 2, row 7+ > > > > Then the best would be to change the type in other bindings to have > > int32 everywhere... but dtschema also requires unt32: > > https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml > > yeah, and also '-kpascal' might be too coarse of a unit when we talk about sensors that have a -125 .. 125 pascal measurement range as '0.5ND' has. > > cheers, > peter >