Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp483591rwl; Fri, 7 Apr 2023 00:00:31 -0700 (PDT) X-Google-Smtp-Source: AKy350bQzR8i5if8BAHKQBDvHDxhSkrorFBtwxy/bqTwwveQIo7SHR/lp8pqcNv0KTPOTDW8DLvU X-Received: by 2002:a05:6a20:6d22:b0:d5:2bf3:fd8e with SMTP id fv34-20020a056a206d2200b000d52bf3fd8emr2220494pzb.2.1680850831376; Fri, 07 Apr 2023 00:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680850831; cv=none; d=google.com; s=arc-20160816; b=m07gDieiyWVgyffw3oMtme6dSzNNPUomIhA+vLmNxiU9cLnr+RYQPkgANyNvd0Zo/i AVtm4vuT0WfxZISFciS1+gPBF5US/jAX1Z0t4/zJdKYEQSH/1y2C0+uM+K+Fh+cnFgd2 CBVNQqxVR+zQZi/8ir+ht4VMp6NRDuSgE7cZiiksQQw3GpC8thyeUrBjZhse226R+l1R Gz7/cEr5xjtjekuckSofO93yCNjCmvOfE5jS/74LSTopS2gnGamMH/z2r10d00mBG+h5 HzifURqhbS2Pcx37KS9xrR9BIqdYI6UTqP0DZwiGWQgduoRV2NGRO1FZ/G1Y1HUk6P7R 0c0g== 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=sMj/sPuZesoqvymEOyWr70VLeiXX+LlQGx3oViReySA=; b=GBlpvcIeisZuyQ7GDKE3Ooh1Y18tQ2N8V+NB7RiC+FcqElC8ecPlFCxUaWeURisLH/ dbecL2VdsjRbAaBDyBmEaLhZXckIdlYhpwNev3l3nJj5MYNXDqsPWwjmEJ3S3Ovos40O OtbLm/0gKIUNzPoBtqQEJQa50VmbCg2kygrz4v2t1E9hj3WvreisdSCb6BsNhKDspL+L AjCTJNY9S5gIFg+Fjte4v45e23MRX6fx1y+y9aXOsBkjuIiTSMOY/tg19QQh1gzLIw3d jNrG8ZAx20Tp6+p7c9vL4ckYHxHyY1SKuL13GgPPPeuGzPCLWFxCmNPNHdvj8PTlc/Pa K0nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hrR+hzSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a63e34b000000b00513cdc43ecfsi3029682pgj.332.2023.04.07.00.00.18; Fri, 07 Apr 2023 00:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hrR+hzSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbjDGGpt (ORCPT + 99 others); Fri, 7 Apr 2023 02:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjDGGps (ORCPT ); Fri, 7 Apr 2023 02:45:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 375066581; Thu, 6 Apr 2023 23:45:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C400664EFC; Fri, 7 Apr 2023 06:45:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53C5AC433D2; Fri, 7 Apr 2023 06:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680849946; bh=sMHAm0SIvY3L1eUS8vd59ZrC6BLoBQte0hiO3SR+Z/w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=hrR+hzSiKmLUyvnWqpgZPDgPkM4oO4PAzIyphCpshDjlKUKlnXgke0BVpgBXwMLfo pls7flzb0+l3M9Z4dAZ+/QBuDD2lfNNyLBMcfhDl8k6NG9pX28KTVbRmR1c+uAHUG5 xxFCRjRlWWdcutbqRYxJhgp5x0+jrDUOkEIJBG2TTxpfZDSQFA6GHc0a4NLa9iVaNw BFebZ+5fFNQ27tVCZXCGfUsynvu2X3Vu5Hph0CV78vMVUoB5OeNyoNazrekz9Xo/6O u/4dOIVrwLz/9cxLuaVCBsN+3/GwNSf2XnT1L5jz8GJaRv8wJRRXbWU1nvqPuKaEae 1hvyDxNXTr9Wg== Message-ID: <83faad26-bb59-14a9-23d8-9e53a235a18e@kernel.org> Date: Fri, 7 Apr 2023 08:45:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors Content-Language: en-US To: Andreas Klinger , Jonathan Cameron Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Angel Iglesias , linux-kernel@vger.kernel.org References: <20230401185717.1b971617@jic23-huawei> <20230401162701.1d3caebc@jic23-huawei> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 06/04/2023 22:15, Andreas Klinger wrote: > Hi, > > thanks to Krzysztof, Lars-Peter and Jonathan for the review and suggestions. I > have one thing to clarify. See below. > > Jonathan Cameron schrieb am Sa, 01. Apr 16:27: >> On Sat, 1 Apr 2023 11:42:15 +0200 >> Krzysztof Kozlowski wrote: >> >>> On 01/04/2023 11:09, Andreas Klinger wrote: > [...] >>>> + honeywell,pmin: >>>> + description: >>>> + Minimum pressure value the sensor can measure in pascal. >>> >>> Use standard unit suffix: >>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml >>> >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + honeywell,pmax: >>>> + description: >>>> + Maximum pressure value the sensor can measure in pascal. >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> >>> Same. >>> >>> Why these values are suitable for DT? Does it depend on type of sensor >>> (thus it is implied from compatible) or on system setup? >> >> I think we'll end up with a lot of compatibles, but that's still better >> than free form description. May still need these as well though given >> the datasheet helpfully adds a foot note. >> >> 1. Custom pressure ranges are available. >> >> Might not be worth including all the details though but unhelpfully the >> bits we care about are after details like is the gel food grade or the port long. >> Definitely can ignore the encoding of i2c address / spi in the last few bits but >> may need the transfer function. >> >> >> mpr-0025GA-A maybe as a form? > > Just to clarify: There are 32 different pressure ranges and 3 transfer functions > which means we'll end up with 96 compatibles and 96 I2C ids. You anyway need compatibles per devices, don't you? https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42 I already commented on this. > > Would it be an option to have only one dt compatible and to add the pressure > range as dt property? > e. g.: honeywell,range = "0025PA"; Did you just decided to ignore my comment? > > But because of "Custom pressure ranges" we still need the DT properties. In this > case there's another "mpr-custom" compatible, right? Please go to my email and respond to comments. Best regards, Krzysztof