Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1875523rdh; Sat, 25 Nov 2023 06:05:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVKne0BDpwZkxEGlBcK6zNYGYJA0U9oCtdIMLWMK6ZyQd57t4XiZOb3qauqPDrufYgB5lc X-Received: by 2002:a05:6a20:4423:b0:187:a6ee:9d6f with SMTP id ce35-20020a056a20442300b00187a6ee9d6fmr13649032pzb.0.1700921101322; Sat, 25 Nov 2023 06:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700921101; cv=none; d=google.com; s=arc-20160816; b=ZhyknfyPy0CMpHvw+OJ3jOeg5t3pkRazgdZM3cs5/aJCzAuguVDPqHAcEmYp9fjyra xp31DKyS0eK5JgXi5aJ5HMUyvz0+j4EI2RQm7kd9TgmW4KvvblOHeoRiYNVrXHWCPxP+ 4xuhRBx4cq9JCSsbB9Mn5Lr93FDIRB2gZ0YgbjKJ79PG+Pk/Wqijyvq+KTvRCm/cf5p9 C+MZRG0kskF2Jd/gu9iknZTXkAC0wHtCJSNS4uterQxdU7QI/Q3zWhklrb09mPs4weVL w8X9qD08phR6xXmVUFPbUsLFMRMCeBFtt1pm7j7qTngxu7AXxCab0KWGSUQgkPWdqgQ8 O0CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kg/nVscgfyPLtHd8K2LmsEpXE5WhAoC+VxpW92VA0fk=; fh=2nQBOaBKhnW+Uhdrbg+UgbquIOi0h7n5f/qQeD6NClQ=; b=JbalyhedGH3TBCGx+bP86+lU12+tOhG0VJQEZoqPBaz7tB7ahKiTI2QG/0ITp+pvw3 McGKLkF5TbpbkpoCh7mGLlqEOPCFs4WnR0RtWRVwe6kHxFhM2FRHcS2vZRdLO3Zc7OJY XM7jC1oBj1q751+f0tYOxmpdTBaMeHDFh0pGjQodTvU0OyEs8aEJAOnmA24EBl/CPr5v pAckL/WqSaaXFOgWCQ3Ay1PeNwpRldGVY6OkSpxhHD30Slpvq3NMtlpWOv64Kx52uzET GW5UBDNz2k77ANOMRNIHjxbKEkghVj+0Ma1u9UsAjrNJQ6gHsBVTb4Rd/B+Vjzs23OgC PoQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rF2HsCYM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id u14-20020a63470e000000b005c201808430si5886175pga.120.2023.11.25.06.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 06:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rF2HsCYM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 77037804C4A8; Sat, 25 Nov 2023 06:04:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232047AbjKYNuU (ORCPT + 99 others); Sat, 25 Nov 2023 08:50:20 -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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 25 Nov 2023 06:04:50 -0800 (PST) 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>; > + }; > + };