Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2468172rwl; Sat, 1 Apr 2023 08:14:28 -0700 (PDT) X-Google-Smtp-Source: AKy350bE0wE86ryxbgQ0eN5TsaND2tGH71PG59NQR8f1ChvGBLLY3c9/79Z7RSz23Z5/Xem03yef X-Received: by 2002:a17:906:13cd:b0:931:2306:f363 with SMTP id g13-20020a17090613cd00b009312306f363mr32337114ejc.21.1680362068117; Sat, 01 Apr 2023 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680362068; cv=none; d=google.com; s=arc-20160816; b=DnYhkHlY1o4c7FU2L83BPVrG+G9PldYd1tFYXhgk5SLBj4Dow1hYv2zc+Fbo0s17Hs srnmjHnSdhmQ2g/lZPxGv2V5uzCR9FFJnCbgPuPOugx2t8cWTXg+rsBHWhPv1wSMTX6W 9teC6OuDM6wO66eLkNVBmJmzS1jq5dig3Ze66fusCKFLInhFuSPev6zhfFTJ32PVQLpm D0I9H9jtUWTCydVvsj5OD0pqqkx+6Q0DAQDL2Tor9CTnQ4s+uokILh4eDL4PY6TQ7yjZ Ma3qGPa7i66IpyBlpUI8L36+X7PoDXSJarbExPRcPbZu+0g6ALwZhvvzdMnbWXuSLmC4 OiUw== 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=SzwOcO2pCHdo58Fzitf/ZtCScCoM0RfquvA7pa10QWk=; b=bqF46hDOiU6UjuDgXWEdAvKgf/wj2uCAGRbG2sgB8kpLo5cs8/lHu206iyAb2ui0YS P4LwojognQAWgkXkLlV6kuSl7fr3gzd+kR9g/dkBLU2RIRzj2zjtiqDX525JF7RLOT3M kHW/H3vKt91g1ztwAcPzp5TU62pQp8RLLRD+JNQoaaCNzepulw4exma0qqjcFCXqor7a 9Eow19+uti8Mfp8XCg06NSjoyNRI4dSS/fg2R2S0OjJrzxLCiw2b1wt7dKI+pDtNYAOS tO908tFNv818sGJxfhyb8ZUuAFQ0O5U+/Fn5MG/PBR4V250PNHOIzFnXjDdoSGd5Oo3p KPzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dNgxNHjt; 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 gj8-20020a170906e10800b0093338c0f70dsi5017263ejb.117.2023.04.01.08.13.40; Sat, 01 Apr 2023 08:14:28 -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=dNgxNHjt; 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 S229889AbjDAPNU (ORCPT + 99 others); Sat, 1 Apr 2023 11:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbjDAPNF (ORCPT ); Sat, 1 Apr 2023 11:13:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 228EE2C9E4; Sat, 1 Apr 2023 08:11:54 -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 2DE4960EF4; Sat, 1 Apr 2023 15:11:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAC00C433D2; Sat, 1 Apr 2023 15:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680361913; bh=wTscgcXld0H4clYFfNpFQFdLK6SrhrlxTfvXICUjKsQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dNgxNHjtjKcbrscEJe0kuyflYLy9AnJRLmOu5qqggRokpF/hGRgUZrI56vmZuRTgz 5R5oooMIcc5pQppPy1bYhHhIsDgmczrpovhxmfZf+ceaynN5vG3wZsYIe4oj5DHIuo 9v5+Z/I7TIMM3GPbGxoFAZrR5TcvAWJJDFQhsZKPpxSmlUhaKglzUoHFVrRbqXJ29i EX+QZvpynqsidiIpA6WAjjI/cC77J/3yiHup70KdES4j241d26yzS3yJzufFln4E1w 8/tAoefQzXIuX25g9RoSJZUFgQg5e6O8W9EWO0J3v50C+PMudc1+771Uazyn595sKN zw4Aci4Uc8ZRA== Date: Sat, 1 Apr 2023 16:27:01 +0100 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Andreas Klinger , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Angel Iglesias , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors Message-ID: <20230401162701.1d3caebc@jic23-huawei> In-Reply-To: <27a1d0f4-3a02-c7fd-36a0-07729a136e20@linaro.org> References: <27a1d0f4-3a02-c7fd-36a0-07729a136e20@linaro.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; 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=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Sat, 1 Apr 2023 11:42:15 +0200 Krzysztof Kozlowski wrote: > On 01/04/2023 11:09, Andreas Klinger wrote: > > Honeywell mpr is a pressure sensor family. There are many different > > types with different pressure ranges. The range needs to be set up in > > the dt. Therefore new properties honeywell,pmin and honeywell,pmax are > > introduced. > > > > Add dt-bindings. > > > > Signed-off-by: Andreas Klinger > > --- > > .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++ > > 1 file changed, 74 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml > > new file mode 100644 > > index 000000000000..d6fad6f841cf > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml > > @@ -0,0 +1,74 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Honeywell mpr pressure sensor > > + > > +maintainers: > > + - Andreas Klinger > > + > > +description: | > > + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C > > Doesn't look wrapped according to Linux coding style (see Coding style). > > > + interface is implemented. > > + > > + There are many subtypes with different pressure ranges available. Therefore the minimum and > > + maximum pressure values of the specific sensor needs to be specified in Pascal. > > + > > + Specifications about the devices can be found at: > > + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \ > > + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \ > > + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf > > Lines are not continued, so drop \ > > > + > > +properties: > > + compatible: > > + const: honeywell,mpr > > You need device specific compatible, not some generic one. Rename also > then the filename (should match the compatible). > > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + reset-gpios: > > + description: > > + Optional GPIO for resetting the device. If not present the device is not resetted. > > Are you sure it is wrapped properly? > > > + maxItems: 1 > > + > > + 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? > > > + > > +required: > > + - compatible > > + - reg > > + - honeywell,pmin > > + - honeywell,pmax > > + > > > Best regards, > Krzysztof >