Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp158994lqp; Sat, 8 Jun 2024 10:02:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEZSheL+KTRxAnaxJl2pHkNBDFUsCYrmbuU+v/KUYAfa/8Kgjkx+tKwAF+QiFcEpRIQ9zEU9aBum2+fevEFE0kLYgSNdL10vFabUbgyQ== X-Google-Smtp-Source: AGHT+IE6cxrK6RIYmMmewaVk56IhNbgnfgSk3s1PxsgxpQ3TFUYzwsPyiQgD2nJsjYm8KeG8fO3Y X-Received: by 2002:a05:6a20:a103:b0:1b2:5938:a4de with SMTP id adf61e73a8af0-1b2f96b3366mr5913096637.12.1717866137898; Sat, 08 Jun 2024 10:02:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717866137; cv=pass; d=google.com; s=arc-20160816; b=kFTy7iPstn6GFYGTxZOPpsGhHmJZkZT9VkrnnwwYfRnFu4XknhbqucrvMzDtiJu7Mo Z702oD6OGG3KCkb1V3EI1IfdLNs7RMRlsrUboY1FUXaoPgWXdswXiSmsIJTjoc8YZwyZ yPj4NmFT5wUo1MwgB9iR8SzuPJgZGqLLoC1y/HSINI6oMn74HTeGzndavQtRy0+7ilTB LY089E1BVIgHqHmrRuk+O6TJNQM7lyEF5E5hX8p3nioYOWKDKQ8FRnzi8xCqdw/WPlhr g7kga6vfFYGP7e3zsTf7pbvoATsQwe0Npay1lVPc4WMd3OXFTiyiZDjQh/Q2iWL28gnn Wrhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=/wlEjQNXZMXZkm83gfbexIQjxZbjbpKtRM9iR8eyELI=; fh=LHOIUCpLfQj+0LFHySmisXS74rADgnQaFQTLhab3TyI=; b=hnMTu3L23hkwS0PntYcXSNPSgUibhRCDn6me2NfK4ITm8NlkOFTm4sjxuf8soofADD XuFxNSHyQ9J8UdInquyZfz/QcSommnKwrbmvHD9oWWiUZUEiN9DknpV/LnbKGRtyoGx7 uRQ9jnhD/YIABR6yFYFeFjvpkukOeCpwLQzrXI7OOm16WCCwicnteGYYbI9xIotLYttm i4yPRPSrRwaqUiN1j4I0eVILXXc76y31jVyJ+q4x5BzF4FuZOSrrxwBAch9IuyPTnVFd WI2peyC4eUokzC1vZdP27Q8JH+P9HtySwGc3cy9b9/x4elfGj2jclFpGjzliM2r8iP4L 9gDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QjsorjkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207148-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7042534e3c2si1286406b3a.241.2024.06.08.10.02.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 10:02:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QjsorjkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207148-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A7748B21E04 for ; Sat, 8 Jun 2024 17:02:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B937178CCF; Sat, 8 Jun 2024 17:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QjsorjkY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F5501E4A6; Sat, 8 Jun 2024 17:01:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717866120; cv=none; b=YrsIZZnuCZlGCafVqVnD3RkejxP22cRfWDNQvmYvq2KRWsy4bzB+bhE2SIgTLq05D8sbAoFxY1/nWyUnEYy4jz2oiXQv5PwcJUAdzjSR3/7k/bpIDaLAAZHMGN4CvAz5pqh2h1v2Q81NSJiFRueaehBN07/UnF34ONXFjJzzJiw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717866120; c=relaxed/simple; bh=A3r29e7wb30cc4dRwLJF3YtUmAvgUID2/+yok408rUI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d7GBLuxBZWZRqqBR2jbPP97g4lvuTezEvaHtPQkiPTD14ddkvmwxISmw71AYag+dDL4Rj5rt6pAQ4RGsnNjbnt8fBH/2y38cpjCg9PUqBpDUmc3ylYJmbpNBMFGaKfhnGEogWdjs1deqjXpXBhh+cvXDGeZjKpGrI369ca+Lbq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QjsorjkY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74050C2BD11; Sat, 8 Jun 2024 17:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717866119; bh=A3r29e7wb30cc4dRwLJF3YtUmAvgUID2/+yok408rUI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QjsorjkYeR5ot/2nx3YQdJ33Ltg7bo9ynIyZ0yy2tLEkL6WevQY/ox4rhbzKIuNL0 c4PnPynRch6bF7EhS431Yh7+23/1SCWMUxrScswPag2sVt30ceU55C5QgGJeVhweW9 0d2061sm+bLRZ5lhW4J/SSomJKUPG3ayYhr4lYfi09X7NiPaefdxSyMjOk/9fbCo3g XSthg/0ScJ92zFZDO6RcKgLZuAwiNOx38r2rhCnn+Ir50cEoLpuLIY6IptQiTVGq9W NOfNX8tP/gaO33ix+mMHJny9npkfZvbamHxNJh+C3x1ZcTi1kyxzQIHahEpmKPp8uF 9Ir41p0yUlElQ== Date: Sat, 8 Jun 2024 18:01:52 +0100 From: Jonathan Cameron To: Yasin Lee Cc: andy.shevchenko@gmail.com, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, nuno.a@analog.com, swboyd@chromium.org, u.kleine-koenig@pengutronix.de, yasin.lee.x@gmail.com Subject: Re: [PATCH v4 1/2] dt-bindings:iio:proximity: Add hx9023s binding Message-ID: <20240608180152.386db8a2@jic23-huawei> In-Reply-To: <20240608175758.73396584@jic23-huawei> References: <20240607114138.390272-1-yasin.lee.x@outlook.com> <20240608175758.73396584@jic23-huawei> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 8 Jun 2024 17:57:58 +0100 Jonathan Cameron wrote: > On Fri, 7 Jun 2024 19:41:37 +0800 > Yasin Lee wrote: > > > From: Yasin Lee > > > > A capacitive proximity sensor > > > > Signed-off-by: Yasin Lee > Hi Yasin > > Some improvements but seems you missed some of the feedback on v3. > > See inline. > > Jonathan > > > --- > > .../bindings/iio/proximity/tyhx,hx9023s.yaml | 103 ++++++++++++++++++ > > .../devicetree/bindings/vendor-prefixes.yaml | 2 + > > 2 files changed, 105 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml > > new file mode 100644 > > index 000000000000..50bf2849d823 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml > > @@ -0,0 +1,103 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/proximity/tyhx,hx9023s.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: TYHX HX9023S capacitive proximity sensor > > + > > +maintainers: > > + - Yasin Lee > > + > > +description: | > > + TYHX HX9023S proximity sensor > > + > > +allOf: > > + - $ref: /schemas/iio/iio.yaml# > > + > > +properties: > > + compatible: > > + const: tyhx,hx9023s > > + > > + reg: > > + maxItems: 1 > > A device like this needs at least one power supply. Make sure to document > all such supplies and make the ones that are required for functionality part of > your required properties. Note that you should do this even if on your > board they are always turned on. Ignore this for obvious reasons given you have just below! However should be required. > > > + > > + interrupts: > > + description: | > > + Generated by device to announce preceding read request has finished > > + and data is available or that a close/far proximity event has happened. > > + maxItems: 1 > > + > > + vdd-supply: > > + true > vdd-supply: true > > on single line is commonly done for these. > > > + > > + channel-in-use: > > + description: | > > + Bit flag indicating which channels are used, > > + depends on the hardware circuit design. > > + $ref: /schemas/types.yaml#/definitions/uint32 > > Presence of the channel nodes below should make this clear > without a separate element. > > > > + > > +patternProperties: > > + "^channel@[0-9]+$": > > + type: object > > + properties: > > + reg: > > + description: Channel register address > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + channel-positive: > > + description: Positive channel assignments > > + $ref: /schemas/types.yaml#/definitions/uint32 > > That size seems implausible. What are the limits. What does > 255 mean? > > In review of previous version I pointed you at the differential > channel bindings for ADCs. If they cannot be applied here > explain why in your patch description. > > > + channel-negative: > > + description: Negative channel assignments > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + required: > > + - reg > > + - channel-positive > > + - channel-negative > > + > > +required: > > + - compatible > > + - reg > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include > > + i2c { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + hx9023s@2a { > > + compatible = "tyhx,hx9023s"; > > + reg = <0x2a>; > > + interrupt-parent = <&pio>; > > + interrupts = <16 IRQ_TYPE_EDGE_FALLING>; > > + vdd-supply = <&pp1800_prox>; > > + channel-in-use = <0x1F>; > > + channel@0 { > > + reg = <0>; > > + channel-positive = <0>; > > + channel-negative = <255>; > > + }; > > + channel@1 { > > + reg = <1>; > > + channel-positive = <1>; > > + channel-negative = <255>; > > + }; > > + channel@2 { > > + reg = <2>; > > + channel-positive = <2>; > > + channel-negative = <255>; > > + }; > > + channel@3 { > > + reg = <3>; > > + channel-positive = <3>; > > + channel-negative = <255>; > > + }; > > + channel@4 { > > + reg = <4>; > > + channel-positive = <4>; > > + channel-negative = <255>; > > + }; > > + }; > > + }; > > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml > > index b97d298b3eb6..e2224eea9ab9 100644 > > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml > > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml > > @@ -1507,6 +1507,8 @@ patternProperties: > > description: Turing Machines, Inc. > > "^tyan,.*": > > description: Tyan Computer Corporation > > + "^tyhx,.*": > > + description: NanjingTianyihexin Electronics Ltd. > > Use a separate patch for the new vendor prefix. Makes it easier for people to cherrypick that > if they are backporting some other tyhx dt binding. > > > "^u-blox,.*": > > description: u-blox > > "^u-boot,.*": > >