Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp156929lqp; Sat, 8 Jun 2024 09:58:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpwo73m4riXLSI8IpHcBPKR5I6P6kUyAmmjSl6guqr/Ll466KruCsjk3vaUxJuRH0GulbGUtwdKXOKk2axNJOzR5xe0rLCVmGSZn0g7A== X-Google-Smtp-Source: AGHT+IGEMn7p5D2Vra8njlQrBwmyOgLVKPwqlINaoLuwa0lTL8IZQPnPJ8GiJ6T7t+0gBvJ/26xG X-Received: by 2002:a05:6358:598b:b0:199:297b:542e with SMTP id e5c5f4694b2df-19f1fedc446mr749406755d.19.1717865895647; Sat, 08 Jun 2024 09:58:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717865895; cv=pass; d=google.com; s=arc-20160816; b=URgEnDuJ6tXpwX4qmRk56bj9HzFEe1V2KzrpWl/ubBlWr/GvzLbAs4Ww4pqA0gf24A JIApM/jPUWT6AhXMSmNUX8UtEfEuJzm13aji83pFcfrqdxQAT+Rej4wSJda7dLymbyIM XiMFSJgYu33UxjTXlPNs504nm0CfQWgAIRb5gNr43jAd3hV/pemWvgUjrQD6i+k3cGWa 5KgJoRnJrdgFi+Obdf1Uqh4TVls2tmfor6SoX1Fr9voneORuKXZTtC/7k/OpLCqC2MTi 2w+KeNO6Cl+b/W60Eqg4nhjEqVLNJXiU+JOMhPbjjb5pLbVBA8/N2DD8ZaYkzCXe38H7 50Bw== 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=R9Mj0FYDqflJ41Kyht6bnDYz7dKLjjHUTB9ufF5uXW8=; fh=LHOIUCpLfQj+0LFHySmisXS74rADgnQaFQTLhab3TyI=; b=RrtGMSHk2ehNdMBEU6MQIHcxBt7puDXpHP+tG72kZ8qADay5v0RMML/iZaGwGIor52 c8spVEnQGknTPr2XBn/h+HMj+y+9H2LGWWzANXT8kAipYnXehV7wD0uzbQcIPsmUZ+nm WNx9E+p5iECQOms1VTh2F0fOF46vxJPI1uocGSReXCTgPzN+TMuVnUfsOyTXTi8lstNo zKyxrxaJoHfqyWYu9civZdtxtqw2IioBnJG4iWb9pIU1MVZdX7jnuCip98mSsJVAvfgs Tv7oTDxZEqhg3EnjI4946xLIcDzvHB+Zh+9gMdvF6g1mfzVkaLxbSnD/8Esz3er0Ovp7 fjrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dxoEBJvD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207146-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e4dd965be7si2363017a12.715.2024.06.08.09.58.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 09:58:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207146-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dxoEBJvD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207146-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207146-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4024E282812 for ; Sat, 8 Jun 2024 16:58:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B018E17B504; Sat, 8 Jun 2024 16:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dxoEBJvD" 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 BEFA66BFD4; Sat, 8 Jun 2024 16:58:07 +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=1717865887; cv=none; b=mr7l55OxdHuRqKEJrV0cFNwJ8vMm2YJLH5VdwiZl7sTfJq4Q/aRyTvapSf8yL+HHG/P8ZuqdXU8CZB9oRRBJ0N2tpz7R9qBFV5+owMtPg+x0WT9pdX4AQjAdNAyuMmxBkkTAOyBTqith02X3VhVpL9fL4Gp+nDQggkAL4tJ5cfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717865887; c=relaxed/simple; bh=cneqwz7LEfUXNP4OwZRkoStIq/D8LnoM4XEbBA8K1QM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lhJpEnXmEFOnWabF5panLEq3YQdaENKhiWjbFLpcd6wAFHNEgqV4PcmpUDD08+H4fHFBmEOQhYorPMQE4tYUDt3l7BZ6J8uPB3aEvc3LdbdyJ6CW48APOithLrX0USAwCzHe0n7ENzepG38Rkl/if2eDroJF3Lr6d8QGPNNoAaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dxoEBJvD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDC71C2BD11; Sat, 8 Jun 2024 16:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717865887; bh=cneqwz7LEfUXNP4OwZRkoStIq/D8LnoM4XEbBA8K1QM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dxoEBJvDii4nhZC2oSqTlH67cctyuN3bN7p2rdZVxXEv7HfizfmTVJ1uHF74OUsMR lPj/BL2Ocp3cEjz3O6fCdwDMKiq7QSzptNZWuTG8fSUjfL8GqCQMypJGzd1j0eygPp lTT3qcLFKVd8CO+qZ7Jq29iLm0oe0wAqYu2hXsZ2IivDDQdCu9/9vraVCi1yWf9VNI 6LGekzCqBawYpXEtbgQrY155/A6+KcqtwakaZcLRn9S9oDDrQPYZ+q1qDX/zmJdT1y sLuROietflRqU1241onTzQc6HB2Rhg0MQZdxqy4vh5Y8WlDFFVXoJQwFj8yJOzVHBO a8E4SjKmzrDPQ== Date: Sat, 8 Jun 2024 17:57:58 +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: <20240608175758.73396584@jic23-huawei> In-Reply-To: References: <20240607114138.390272-1-yasin.lee.x@outlook.com> 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 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. > + > + 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,.*":