Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2047722rdh; Sat, 25 Nov 2023 11:21:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpXAVdRLlHKs8xUKSWoIJ4c8s5MBeaQINGVgV4y+GWQybiNFEcpK0PEA6OWCsHdaAqnURJ X-Received: by 2002:aa7:943a:0:b0:6cb:a60c:2140 with SMTP id y26-20020aa7943a000000b006cba60c2140mr5967456pfo.28.1700940099216; Sat, 25 Nov 2023 11:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700940099; cv=none; d=google.com; s=arc-20160816; b=RWBZXIShy87Q/HHqCtPT4DHyAt+HA+TTOkb0xqEbujNPLaZQA+NfIvB4rA36s8x6Z4 y1tJRdSZg8lAssPYDDAVryzsx3SfywyxeLS0/BM8/vECZmsUNdDifGf5A4BKUtBBb7nW I7zZfFpIfXL3DlxZwOzvpNxshm8KHw+CLV/KY/zmeXwICpUKt/F/EouoUAENTREwCnMy xyT/CHDZbp1Sbo8Q03lp1/NT2+jDzdMty2MHQfilOHvMqGFRg+3vxJHs/jkxQsLgI44w /boZ6niZBul/kyzkhKy6LSgAopojEY0TfOS7P3isgk5kfFgLTSnACB09oEY0lhfhARJU 6ylg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=UcNILfAUZbqIFm7OmX63/K+3cKydGdULnHMJZEs51kM=; fh=NoFxNr6UtE/iK/ueyZ4NrhPFg/uZ4vbY5VCGZrV6TI8=; b=HkPOkiFZznxF1NkksnACdqzSfedpN3OVRJpJ3MZAuyxeoTnC0kur1UuZp9wvOsQVEj S+DnO6kerNrH8RJDNhohglLiEaRNP1UDOoRwlR73XY+peCLguxwbkMTyRuur1VcPn2ny cSm7/rHyhj1adRVjZpGkSCmkb4a+3brbMJ6tTi4Q+gB9yI0z3pvNffXk9IbuO3DSi5ri aboAlTudS5C8pGErOWjCVlDvSDXtSwDw5knLl6bDG3fJZ6OpofzINoiBmk1uucHO4YWK JSBo2qpKojaJ5V5b5OOKB2nzrk/76G99EwlLlbFP3LAUWh0amtvXcc0xNLrVkB6y0Mai QBMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sb6FVtOk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a12-20020a62d40c000000b006cbf2bec824si4530302pfh.302.2023.11.25.11.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 11:21:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sb6FVtOk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E4DDC804F61D; Sat, 25 Nov 2023 11:21:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjKYTV1 (ORCPT + 99 others); Sat, 25 Nov 2023 14:21:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKYTV0 (ORCPT ); Sat, 25 Nov 2023 14:21:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC084118 for ; Sat, 25 Nov 2023 11:21:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6713C433C8; Sat, 25 Nov 2023 19:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700940092; bh=1WVqsLzDFggpUKiGezfN49UcPqnUKcOjEe2mjRbMP68=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Sb6FVtOkCPaRpLPtg39IxHFpRR+ZGljFDCKQdlnhkgIeNSWBwB8bJiHn/DNCTCLL3 Vvpv8lcYUzPEN/+Ng0TTHMD2H73NK7lTGl0ULecuSORNkbRfSxaWcrieVlh+JbM/W9 ZdrXI/JuVoXZj7bwqR0aFJhKm1UuL9IZma45ZcosTtpLwkDrdQ8QGHYWLqYFHv8VxK H8VO6ytzhzA4YaAcZKB4k9fdulwhI3qMqCe+KKiQFpKfbp0uydnFmZzl8jspqFFQPc sA/CP+YskZm8IzezzUj894fdmqenyp66/QYTPogPFsQV1f0U0mUwM+4qGrTcjswtfs xB6F4ROhy8hvA== Date: Sat, 25 Nov 2023 19:21:26 +0000 From: Jonathan Cameron To: Petre Rodan Cc: Jonathan Cameron , 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 Subject: Re: [PATCH v2 1/2] dt-bindings: iio: pressure: add honeywell,hsc030 Message-ID: <20231125192126.55cda541@jic23-huawei> 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> <20231120173929.00006a6d@Huawei.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Sat, 25 Nov 2023 11:21:38 -0800 (PST) On Mon, 20 Nov 2023 20:25:08 +0200 Petre Rodan wrote: > 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. ah ok. That's fine then - searching the datasheet I found didn't include that particular string, so I was rather confused. I'm fine with specific now you've explained where it came from! Jonathan > > > 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 > >