Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2427960rdb; Mon, 20 Nov 2023 10:25:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFws0Fm9NZJLTV+GBqglEKgGAmAgyzBD4/E3E82LjJ4J8a0xfB/9EYbRP3RCM9M1apV3Kd X-Received: by 2002:a9d:774f:0:b0:6bb:1629:ab44 with SMTP id t15-20020a9d774f000000b006bb1629ab44mr9662030otl.7.1700504727700; Mon, 20 Nov 2023 10:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700504727; cv=none; d=google.com; s=arc-20160816; b=aSWISCEqFXJW/5xGdycLLasOfU8zSlrg1uukp1y+3W6Pze/BCSLGEPW9dZXTyrgaoL lrOYmZ3ILB9bPuxww8mXpFGpqn36/r4vdGBwJzOTRl5VHAc8IP3cpq6t+we0Yknx6DcM 971XOWdeFwSW3oCE1QDjdAqcX1OKbogB0TpzhJFDRMjnhw3LgU1VR0lb4DVh0mZPGv5u 0YHLOgvxXAGCeuHv2l9I/rFbbzqDLlNgsmQ1LJydZu/OXbrHwOCCawVKr5h9o0tvReYw s54nC6rSpaXJBDB5BJ5RfxGC0Jpj/Zm/jDu1Ojn+Z8207dLj3mxlTpM1ohb1vH+PVkCO fwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=63LyH1we1b/w1t+C9GuMbHl6Oc52x6RSixDTbKmj2JY=; fh=V4ALvrZlo8Lzs/BGEoa/iG+vl7Cs1NkqxwTYDZVR5Ac=; b=mRdrJ3pNDy1HvrdgpB0ZI+lNu/QZCvUNochWoMHCufqAi4m8Tqg72UvPDEdHtEmv9Y B9mduKLFJw/uKlE3RCJyEuOyTffpE7Y4cZ66icAPbGLo00VFYFFjmEdUsWifFMNGexMz JX1pF754mMgU6UZK5fSCO2GhrGrvzIXK17OIU67HJVdriiLQgtlGJQuw+7XYfRJgksja CD/TCqBWDG18YosziSRhZL+bLuVlICcteG1QEgPf1/5Sldl+fg17Sw2SHRTK4gQaab71 e7I04ISt+5H3jx2LmPUtbqXNuCWoPDCDpPZAa9ZWqR3qWosUCQkGj8HUv9yrnRQ4JvKi t+lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=morhvBQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l12-20020a65680c000000b005be3685c1ccsi8555804pgt.567.2023.11.20.10.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 10:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=morhvBQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0339E8043C11; Mon, 20 Nov 2023 10:25:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbjKTSZR (ORCPT + 99 others); Mon, 20 Nov 2023 13:25:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbjKTSZP (ORCPT ); Mon, 20 Nov 2023 13:25:15 -0500 Received: from mail.subdimension.ro (unknown [IPv6:2a01:7e01:e001:1d1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8E1C8; Mon, 20 Nov 2023 10:25:11 -0800 (PST) Received: from sunspire (unknown [188.24.94.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.subdimension.ro (Postfix) with ESMTPSA id 2E5CC28EE6F; Mon, 20 Nov 2023 18:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=subdimension.ro; s=skycaves; t=1700504710; bh=TqPCYi/lfIqtwCO6M0vvyzzQcnlSevyzaWBJMKt67zI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=morhvBQTAbQh5MbTCeiLvnMOThf9SrBu76IjYpU/VGqvGd24SDnqdEqtQQaQ2hFa/ 1WdwaPW+9Yu7PczCiWz9tozCinhRSKceEkYghEO3wtCSk7fc/RtVnhLVAUiIFG8uh1 F/irdTFARvvIzQ0nuW/UY/DlQAbrnMdzKlXufW5s= Date: Mon, 20 Nov 2023 20:25:08 +0200 From: Petre Rodan To: Jonathan Cameron Cc: Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Jonathan Cameron Subject: Re: [PATCH v2 1/2] dt-bindings: iio: pressure: add honeywell,hsc030 Message-ID: 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> <20231120173929.00006a6d@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231120173929.00006a6d@Huawei.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 10:25:24 -0800 (PST) Hello! On Mon, Nov 20, 2023 at 05:39:29PM +0000, Jonathan Cameron wrote: > 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? honeywell,hsc030pa was provided as an equivalent to honeywell,mprls0025pa (which is already in the repo). '030PA' and '0025PA' define the pressure range (0-30, 0-25), the unit of measure (Psi) and the measurement type (Absolute) for a particular chip in the honeywell catalog. (please ignore the psi part, we convert everything to pascals). but both my driver and Andreas Klinger's mprls0025pa actually provide a generic abstraction layer for entire series of sensors. > If we are going generic, feels like trustability-ssc etc are more representative > and matches the datasheet cover page. Krzysztof voted for non-generic, honeywell,mprls0025pa is already set up non-generic, my intent was to go generic. I'll rewrite the code to whatever you guys feel is best. peter -- petre rodan