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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A1A8C61DF4 for ; Sat, 25 Nov 2023 13:50:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232108AbjKYNuV (ORCPT ); Sat, 25 Nov 2023 08:50:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjKYNuT (ORCPT ); Sat, 25 Nov 2023 08:50:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E57103 for ; Sat, 25 Nov 2023 05:50:26 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F718C433C8; Sat, 25 Nov 2023 13:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700920225; bh=ExqPDaAaDFGikMpcUR8jEv5p97UUd1YLtOLKKfLhU10=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rF2HsCYMUDWG7ZbEHvKLtH+iLRfFlviiHlVOsE7Wv/3YhMlQvqeRFKgI2ngby0YsS xZHS/kGMTNpvcdcDLWanlTixFNAgJqtS1y+sKkJBnIJZHq7SXdnnrE21nYXzJmotza pYkkn7N7FiE//NgMJmR6M0zRW/McgFj+rOvzwfBz4H4e32nSkkMTobp2dPQneZw0XZ GKcCUzgr0XOjFtNKqw+2UnsWax709685JUqzIuUqmg+29DtHODZB/qoSAnK1nVDsnJ +frBiWyKOi7scL/hJzvrUGZVSNmr0m4FA+Zp+EzNoKiZxjgs0kqdP0XOFIHdy4q8rx 3hYwzoL1SnJ+A== Date: Sat, 25 Nov 2023 13:50:17 +0000 From: Jonathan Cameron To: Anshul Dalal Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan Subject: Re: [PATCH v2 1/2] dt-bindings: iio: light: add ltr390 Message-ID: <20231125135017.30936eef@jic23-huawei> In-Reply-To: <20231117074554.700970-1-anshulusr@gmail.com> References: <20231117074554.700970-1-anshulusr@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Nov 2023 13:15:52 +0530 Anshul Dalal wrote: > Add binding for Lite-On LTR390 which is an Ambient/UV light sensor that > communicates over i2c with an address of 0x53. > > Datasheet: > https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf > > Signed-off-by: Anshul Dalal > --- > > Changes for v2: > - Added missing properties in the example > --- > .../bindings/iio/light/liteon,ltr390.yaml | 56 +++++++++++++++++++ > 1 file changed, 56 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltr390.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr390.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltr390.yaml > new file mode 100644 > index 000000000000..5d98ef2af74d > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr390.yaml > @@ -0,0 +1,56 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/light/liteon,ltr390.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Lite-On LTR390 ALS and UV Sensor > + > +description: | > + The Lite-On LTR390 is an ALS (Ambient Light Sensor) and a UV sensor in a > + single package with i2c address of 0x53. > + > + Datasheet: > + https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf > + > +maintainers: > + - Anshul Dalal > + > +properties: > + compatible: > + enum: > + - liteon,ltr390 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + description: | > + Level interrupt pin with open drain output. > + The sensor pulls this pin low when the measured reading is greater than > + some configured threshold. > + > + vdd-supply: true > + > +required: > + - compatible > + - reg Same comment on vdd-supply here as in the other drivers. Not vital, but contention has become to add any supplies to required that have to be turned on, whether or not the kernel cares about them. Note I'd prefer drivers to use the trivial devm_regulator_get_enable() call anyway to turn them on at probe and off at remove. That's simple enough to do without needing testing with real controllable regulators. > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + light-sensor@53 { > + compatible = "liteon,ltr390"; > + reg = <0x53>; > + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; > + vdd-supply = <&vdd_regulator>; > + }; > + };