From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B95C388F9 for ; Sat, 31 Oct 2020 21:38:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58CC520731 for ; Sat, 31 Oct 2020 21:38:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="VXL0qRGa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbgJaVin (ORCPT ); Sat, 31 Oct 2020 17:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgJaVim (ORCPT ); Sat, 31 Oct 2020 17:38:42 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF0FC0617A6 for ; Sat, 31 Oct 2020 14:38:41 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id k1so9591706ilc.10 for ; Sat, 31 Oct 2020 14:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FwJO5epnPvesQOydqn6Gq9Da/PQnBT77OXhZI9mi1qc=; b=VXL0qRGaMKJJqsmKPO5cQtDecNNY3PgMdqbdIjbZUsrXGagBWt8s4jidwHgTP5Z53d TY+xfW0uNWB9n7EIMdg1zWQWys24pvlKCGg/lbpbf94EjacssOb18Rmv35CDsor9aGGr E5ZE6L9tG6Te/IJUcFthp5dSqNZAb49335Nus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FwJO5epnPvesQOydqn6Gq9Da/PQnBT77OXhZI9mi1qc=; b=PcKxFLxP3QffOmohtkJ3cHTCbXeRuheJwARRKfSyp0R+o75oJkLv9aDy8OiEaMVIGR /aWZ9IScsRMJwg64w5G+JJ+oLvrBPrUVHYk0qMDs68tSR4MOax0r8j2HDo+LOc3B6IK4 5b20K7mLAYckQksYLcmahRHl8zVpKEfHLSC+y/XckK1YwvY6r1U3DghHFNzBQwiFNXtg tE3GCGnEF5Y9jZOpA8DkS/3lC3/US6UaGRVTvOfF2qA7W+Bw9AtyJViKiPKPVRypUj7i bqZq/E8IoJRfBtC0iF3RzFqNKbZoaWd8w1fhe3U/BZzOEMumKMCmn+qsKbGqN63LA8sr eHbw== X-Gm-Message-State: AOAM533yh6Cv3dqUuuxkKWbF5eMf3GlRuGT3CJasrE5D8re6iUwQ1Sll Yj0U6z6fqVrSlMTSRERrHNnnN01EpOtmvgeu5lrnKA== X-Google-Smtp-Source: ABdhPJxakdN2wbq26ts5LYE6FzoN/ozd33umeMvnlfrwDZtlEZSzXtf9soxrjtxSkQWULCfKqqvDQk/6C1dl611vpPQ= X-Received: by 2002:a92:cd52:: with SMTP id v18mr5822604ilq.98.1604180320683; Sat, 31 Oct 2020 14:38:40 -0700 (PDT) MIME-Version: 1.0 References: <20201031184854.745828-1-jic23@kernel.org> <20201031184854.745828-11-jic23@kernel.org> In-Reply-To: <20201031184854.745828-11-jic23@kernel.org> From: Matt Ranostay Date: Sat, 31 Oct 2020 14:38:29 -0700 Message-ID: Subject: Re: [PATCH 10/46] dt-bindings:iio:health:maxim,max30102: txt to yaml conversion To: Jonathan Cameron Cc: "open list:IIO SUBSYSTEM AND DRIVERS" , Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Matt Ranostay Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, Oct 31, 2020 at 11:51 AM Jonathan Cameron wrote: > > From: Jonathan Cameron > > Straight forward binding. Title was a bit of a challenge to keep short > as this binding covers sensors for two entirely different purposes. > > Signed-off-by: Jonathan Cameron > Cc: Matt Ranostay > --- > .../bindings/iio/health/max30102.txt | 33 -------- > .../bindings/iio/health/maxim,max30102.yaml | 75 +++++++++++++++++++ > 2 files changed, 75 insertions(+), 33 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/health/max30102.txt b/Documentation/devicetree/bindings/iio/health/max30102.txt > deleted file mode 100644 > index 7ef7ae40ae4f..000000000000 > --- a/Documentation/devicetree/bindings/iio/health/max30102.txt > +++ /dev/null > @@ -1,33 +0,0 @@ > -Maxim MAX30102 heart rate and pulse oximeter sensor > -Maxim MAX30105 optical particle-sensing module > - > -* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf > -* https://datasheets.maximintegrated.com/en/ds/MAX30105.pdf > - > -Required properties: > - - compatible: must be "maxim,max30102" or "maxim,max30105" > - - reg: the I2C address of the sensor > - - interrupts: the sole interrupt generated by the device > - > - Refer to interrupt-controller/interrupts.txt for generic > - interrupt client node bindings. > - > -Optional properties: > - - maxim,red-led-current-microamp: configuration for red LED current > - - maxim,ir-led-current-microamp: configuration for IR LED current > - - maxim,green-led-current-microamp: configuration for green LED current > - (max30105 only) > - > - Note that each step is approximately 200 microamps, ranging from 0 uA to > - 50800 uA. > - > -Example: > - > -max30102@57 { > - compatible = "maxim,max30102"; > - reg = <0x57>; > - maxim,red-led-current-microamp = <7000>; > - maxim,ir-led-current-microamp = <7000>; > - interrupt-parent = <&gpio1>; > - interrupts = <16 2>; > -}; > diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml > new file mode 100644 > index 000000000000..67d40f4a91a7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml > @@ -0,0 +1,75 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/health/maxim,max30102.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim MAX30102 heart rate and pulse oximeter and MAX30105 particle-sensor > + > +maintainers: > + - Matt Ranostay Change to my Konsulko email please, otherwise LGTM Acked-by: Matt Ranostay > + > +properties: > + compatible: > + enum: > + - maxim,max30102 > + - maxim,max30105 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + description: Connected to ADC_RDY pin. > + > + maxim,red-led-current-microamp: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: RED LED current. Each step is approximately 200 microamps. > + minimum: 0 > + maximum: 50800 > + > + maxim,ir-led-current-microamp: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: IR LED current. Each step is approximately 200 microamps. > + minimum: 0 > + maximum: 50800 > + > + maxim,green-led-current-microamp: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Green LED current. Each step is approximately 200 microamps. > + minimum: 0 > + maximum: 50800 > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: maxim,max30100 > + then: > + properties: > + maxim,green-led-current-microamp: false > + > +additionalProperties: false > + > +required: > + - compatible > + - reg > + - interrupts > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + heart-rate@57 { > + compatible = "maxim,max30102"; > + reg = <0x57>; > + maxim,red-led-current-microamp = <7000>; > + maxim,ir-led-current-microamp = <7000>; > + interrupt-parent = <&gpio1>; > + interrupts = <16 2>; > + }; > + }; > +... > -- > 2.28.0 >