Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp119124lqp; Sat, 8 Jun 2024 08:27:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBJ+3bqoBWF3e/07J2HNZn2yRoq1cU7qFaJdpirGcqTOJ/OgOAdBZ4B+gSRWYFSM8M3S9gzsKSm8NX99DJVqYCYt6WlEyPHLB+c9GKWg== X-Google-Smtp-Source: AGHT+IGOoydZ8JU4k6acD0gL8VQhBjO6vrdzgv9JlbrpePsAhn2RFaAi+lvRiKxXgn695hu5kk4+ X-Received: by 2002:a17:903:2441:b0:1f6:ab51:22fd with SMTP id d9443c01a7336-1f6d02f7421mr67161155ad.31.1717860439611; Sat, 08 Jun 2024 08:27:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717860439; cv=pass; d=google.com; s=arc-20160816; b=aYqjYlq8k5MhgK/j1N9X8DnZsYbNDkD/xBQK4sfOPcnxfI0N8wX/GCu8TiwCn9/JSs 4BajCf61SwRFb/WgRBUpwM4s2bPvDP0caf+IGR7tEBeGtpM0qjiy/Xx4oXNTB1ToN884 IWs4+dCphbPRbseZ0sx492HQTtfX30oQkUgXqiYMKa4hsg62dRUC4qr+sLhpPYSTqU38 nOhUc0IwiHx3jI9skPhKy+ybKdYWbTTWMkRjR3mPD7yynl+PXcLVna4sht8CUCuVPgBx 59oD4zO0bf2CVqL2/ik2V3l6EAYMvPBETC6nXQx7bch2F+xvrreh55xVWPsiZQ1cargx cjDA== 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=8bLAcNWRP1WrtgeEAKiV82R7/wjJhcpbxovmkIDYAEU=; fh=Wz1wdwiqN9Ze3USXfg0bhuwSSnIqu2Qh9Nq7/yJj5gc=; b=B3WLTrZwpyawu9DH1Lw2Hdfo90WEAUeeuPfR/kjIoqG9TPZTS7elRonZ+/Z1SUgvQF RKIWZS6S25AkNsn5+Hh+V2bURsR9zIbQIokgEj0W7CtXWv4vDJmHkXv9oonXKjc80SGt wpJZ3clqk7mL1b1Zw4XyV0yZrZP90MDtm5aaFupc3NoaBR4gUNb5jMTDGRc8qHyvEdN1 zMOzVSIK/lumIlQPT8hkmv1yh4kTDMjf7Eb6aOcw/aDGUJ5FI8rXomJfKnu5YqD87z/M hziXIyYixcvJn4fc//TLGkHSC/PH+3/X/c8a6mmCBpQl9vaQFw2RBMCEa4DLo8lnS5py Jskw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K7X0HodN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207095-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd75f868si48382165ad.20.2024.06.08.08.27.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 08:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K7X0HodN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207095-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 458E6282294 for ; Sat, 8 Jun 2024 15:27:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74C4217997D; Sat, 8 Jun 2024 15:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K7X0HodN" 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 92C7E1FBB; Sat, 8 Jun 2024 15:27:09 +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=1717860430; cv=none; b=RD2GuVILYJmcx0rBiYIlxSJK+CKm6LjZmMGoaANORaMh1tg2iPKFRBhLPVJr4fmelWnRvUvpT6X1WNsKHx3zHprzE/UuA9szq51vLPj6Xrq158DTGfbCNnZwk61tFzBzxt113DnUXh/js7ybGYpBsZ17qUqRayzYR0w6Q8AzkPE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717860430; c=relaxed/simple; bh=HqxKqrF6NdA4tO9n7xPACAmfKZHrHqPzpej+VnzOCLQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sJ/hN55r2KyewEVFRXEbkRbYlHZb3R6tpqyRrnE9khuARh6e0T0MkqQctdb61UK5EkcFTTuQiWROOTCeycaphdu3/efY0ifE4e4EpWEvtuBSJCl/Z7PKB3r8uwkfV4b4y3C9Q0iEwfkuRaPEUGdXdWILZfXOASP172zkkEb98Ik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K7X0HodN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B18BC2BD11; Sat, 8 Jun 2024 15:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717860429; bh=HqxKqrF6NdA4tO9n7xPACAmfKZHrHqPzpej+VnzOCLQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K7X0HodNqv90N8UjF1zUvxC9P4G/Njtk+Xx8FtDfcFUkE3L0ZypOMUs8uU/5qEcZp dUjakglbA7p+NmJS0CRp/e2vZ6pAKVhBVMQMCh3wTsmHEoYERzYlRqhKGHaoev+FRB B8xPV/irkYm+hrKDqw9pcka+AryRJgAFhide37W/IiLSae/1p0aN5f47OIgn1TE0cM jYzOZfZSDeb9g+U2eMlhjMLZtXlfv/Gp5lRj60e7xo3rnLxN+XJ1hsRCptqAT+gtZr PtvEn/Lt4htY6BBgg3HCp6rC6FpfD9RXgDn1lJDfq4sW21K/n90WZzbOVvjDGhYuUh c4fgBQwEtx29A== Date: Sat, 8 Jun 2024 16:27:01 +0100 From: Jonathan Cameron To: Mudit Sharma Cc: lars@metafoo.de, krzk+dt@kernel.org, conor+dt@kernel.org, robh@kernel.org, ivan.orlov0322@gmail.com, javier.carrasco.cruz@gmail.com, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: Re: [PATCH v4 1/2] dt-bindings: iio: light: ROHM BH1745 Message-ID: <20240608162701.2e6fe36f@jic23-huawei> In-Reply-To: <20240606162948.83903-1-muditsharma.info@gmail.com> References: <20240606162948.83903-1-muditsharma.info@gmail.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 Thu, 6 Jun 2024 17:29:41 +0100 Mudit Sharma wrote: > Add ROHM BH1745 - 4 channel I2C colour sensor's dt-bindings. > > Signed-off-by: Mudit Sharma > Reviewed-by: Krzysztof Kozlowski Hi Mudit, I'd like to see the vcc-supply in here from the start. Thanks, Jonathan > --- > v3->v4: > - No changes > v2->v3: > - Move 'additionalProperties' after 'required' block > - Remove block style indicator '|' from description > v1->v2: > - Fix yaml issue: Make `maintainers` a list > > .../bindings/iio/light/rohm,bh1745.yaml | 49 +++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/light/rohm,bh1745.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/rohm,bh1745.yaml b/Documentation/devicetree/bindings/iio/light/rohm,bh1745.yaml > new file mode 100644 > index 000000000000..d5338a0af6b3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/light/rohm,bh1745.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/light/rohm,bh1745.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ROHM BH1745 colour sensor > + > +maintainers: > + - Mudit Sharma > + > +description: > + BH1745 is an I2C colour sensor with red, green, blue and clear > + channels. It has a programmable active low interrupt pin. > + Interrupt occurs when the signal from the selected interrupt > + source channel crosses set interrupt threshold high/low level. > + > +properties: > + compatible: > + const: rohm,bh1745 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 There are some historical bindings that are missing supplies, but for everything recent we have tried to document them from the first. So this should have vcc-supply: true > + > +required: > + - compatible > + - reg - vcc-supply Even though the regulator framework will provide you with a dummy regulator, the binding reflects that the device definitely needs power. Note that there are nice devm_regulator_get_enable() and similar to deal with turning the power on at driver load (I guess that doesn't do anything on your board) and off at driver remove. Ideally the driver should use that. There have been many occasions in the past (all a while back) where we didn't add power supply control from the start and had to add it soon after when it turned out some board didn't default to power on for the sensors. Thanks, Jonathan > + > +additionalProperties: false > + > +examples: > + - | > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + colour-sensor@38 { > + compatible = "rohm,bh1745"; > + reg = <0x38>; > + interrupt-parent = <&gpio>; > + interrupts = <19 IRQ_TYPE_LEVEL_LOW>; > + }; > + }; > + > +...