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 X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37E55C4338F for ; Wed, 11 Aug 2021 18:38:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E666F60243 for ; Wed, 11 Aug 2021 18:38:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E666F60243 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UmUV1QdC544Nq6iVtFtb6C+MevOzaCX1j0hTO9E7vik=; b=xFZD6xWUKE9aCm +j8TaNZ3iuENYoSY1kaBuayAQyRq0AHadAb6PG+WuQOMVBc8IAqtOJqBk8nka3VQG1aYoBOXmkIdL C9p3D4zR46d2I/868syuOOjdqJNFu4K1xDVpfbCLMr2CRgEfLlSxQgWsTHEtJfxSXb7zvNPkiXPwm V351UXJTN95YwPn3ahW3BLdku3odm2UXVujgQrPqiVFeiTLTWr9vyo+qptNoBUZrMCplBF6M3+vF+ osUS3zDepmH+65q2XwcetlDBv8dWLHgbEHGj9vSk6OKKvpBC24d7OMw/XBDy+xxNVNG0+zuIlV33s HPxJASFS+/DVZGnVLT/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDt5I-007tfn-7P; Wed, 11 Aug 2021 18:36:12 +0000 Received: from mail-pl1-f171.google.com ([209.85.214.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDt5C-007ter-4p for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 18:36:09 +0000 Received: by mail-pl1-f171.google.com with SMTP id d1so3848100pll.1 for ; Wed, 11 Aug 2021 11:36:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=glqU11Z7nUR7hehweN2GYI7VV4V/0DA8qz5QPW5UH5o=; b=czXVdNLQ14hb+h2IV1cosBGQMlyr0uIH2suE9UG09H76KqvYH0JlxjxItv0GFGeskX j/tdNXs9CglJJMGHFqzhpfeIlbF4L3c0ZJ0p8l69sFucTPLeb2U9WP50dUwlGqSvq8fv f/qDgmuFtlUvXgWWwONHwRseoluz/jA5zjqmcsy32e/TpXZkAV8+RcxH+HftonTfBQGH p2C9w//Xt4L6/OkK9NpAeEw060O5JrprfC0bbIRBgYJwwiy7ebM3Y0UNe9/tpL+IvN62 Az/PMrC5IbAZFO2xqGhE7U4jr80mewajl1fMDiBzTdew5NkuimYtLpjltzCdX4NRmA91 yYRA== X-Gm-Message-State: AOAM531n2lKs2KceaVfI+7V1HLxvT8H7UxSCTWR5+tkvOaLWb4RYW3Jc jVgkUusnOP5/MJhNR3pgww== X-Google-Smtp-Source: ABdhPJy1lIURcbSLGNDx7psgyKmkVt4jzczQsNUqlJIMdUhGsaoUjTuug+XLYYeIPqnx17C6mREhzw== X-Received: by 2002:a63:111f:: with SMTP id g31mr119420pgl.80.1628706965598; Wed, 11 Aug 2021 11:36:05 -0700 (PDT) Received: from robh.at.kernel.org ([208.184.162.215]) by smtp.gmail.com with ESMTPSA id a11sm153376pgj.75.2021.08.11.11.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 11:36:04 -0700 (PDT) Received: (nullmailer pid 59304 invoked by uid 1000); Wed, 11 Aug 2021 18:35:59 -0000 Date: Wed, 11 Aug 2021 12:35:59 -0600 From: Rob Herring To: =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado Cc: Pavel Machek , Dan Murphy , Bjorn Andersson , Andy Gross , Jacek Anaszewski , linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Brian Masney , Luca Weiss , Russell King , Georgi Djakov , linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, ~lkcamp/patches@lists.sr.ht, =?iso-8859-1?Q?Andr=E9?= Almeida , kernel@collabora.com Subject: Re: [PATCH v3 1/5] dt-bindings: leds: Add binding for qcom-spmi-flash Message-ID: References: <20210803162641.1525980-1-nfraprado@collabora.com> <20210803162641.1525980-2-nfraprado@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210803162641.1525980-2-nfraprado@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_113606_239991_C2C4352D X-CRM114-Status: GOOD ( 23.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 03, 2021 at 01:26:37PM -0300, N=EDcolas F. R. A. Prado wrote: > Add devicetree binding for Qualcomm's SPMI Flash LEDs which are part of > the PM8941 PMIC. These LEDs are used both as lantern and camera flash on > phones based on the MSM8974 SoC, like the Nexus 5. > = > Signed-off-by: N=EDcolas F. R. A. Prado > --- > = > Changes in v3: > - Removed clamp-curr, headroom, startup-dly and safety-timer properties s= ince > they didn't impact the behavior. They're now hardcoded in the driver (p= atch 2) > - Added valid ranges for led-max-microamp, flash-max-microamp and > flash-max-timeout-us > - Removed dt-bindings header file that held some constants (moved to insi= de the > driver in patch 2) > = > Added in v2 > = > .../bindings/leds/leds-qcom-spmi-flash.yaml | 93 +++++++++++++++++++ > 1 file changed, 93 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-spmi= -flash.yaml > = > diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-spmi-flash.= yaml b/Documentation/devicetree/bindings/leds/leds-qcom-spmi-flash.yaml > new file mode 100644 > index 000000000000..da674d73c033 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-qcom-spmi-flash.yaml > @@ -0,0 +1,93 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/leds-qcom-spmi-flash.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm SPMI Flash LEDs > + > +maintainers: > + - N=EDcolas F. R. A. Prado > + > +description: | > + The Qualcomm SPMI Flash LEDs are part of Qualcomm PMICs and are used p= rimarily > + as a camera or video flash. They can also be used as a lantern when on= torch > + mode. > + The PMIC is connected to Host processor via SPMI bus. > + > +properties: > + compatible: > + const: qcom,spmi-flash-leds > + > + reg: > + maxItems: 1 > + > + flash-boost-supply: > + description: SMBB regulator for LED flash mode > + > + torch-boost-supply: > + description: SMBB regulator for LED torch mode > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > +patternProperties: > + "^led@[0-1]$": > + type: object > + $ref: common.yaml# > + > + properties: > + reg: > + maxItems: 1 Instead of maxItems, this would be a bit more specific: enum: [ 0, 1 ] With that, Reviewed-by: Rob Herring > + > + led-max-microamp: > + minimum: 12500 > + maximum: 200000 > + multipleOf: 12500 > + > + flash-max-microamp: > + minimum: 12500 > + maximum: 1000000 > + multipleOf: 12500 > + > + flash-max-timeout-us: > + minimum: 10000 > + maximum: 1280000 > + multipleOf: 10000 > + > + required: > + - reg > + > +required: > + - compatible > + - reg > + - flash-boost-supply > + - torch-boost-supply > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + spmi-flash-leds@d300 { > + compatible =3D "qcom,spmi-flash-leds"; > + reg =3D <0xd300 0x100>; > + flash-boost-supply =3D <&pm8941_5vs1>; > + torch-boost-supply =3D <&pm8941_5v>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + led@0 { > + reg =3D <0>; > + function =3D LED_FUNCTION_FLASH; > + color =3D ; > + led-max-microamp =3D <200000>; > + flash-max-microamp =3D <1000000>; > + flash-max-timeout-us =3D <1280000>; > + }; > + }; > +... > -- = > 2.32.0 > = > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel