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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 62BBEC433E6 for ; Wed, 27 Jan 2021 15:24:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 EA3F52079A for ; Wed, 27 Jan 2021 15:24:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA3F52079A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=XtcWjSwE+JoiDwxQsOlGMovTkAeP9HgS0/s63xSc9do=; b=dNbOv+L0bb4rqPK2FvI6dwTR8 DvkM5C+hNML0AvB9w61RkI9t7HU+R9JE7lC2vvSsX92QiVJ5a9g/pzpp1nfhMAG6aCzoYJf3V37jz xQe+oPrES6sa4Po4dVrgUatPOCCdLA2zwlez9o1tXId7qB+Ufu03us/T+rB7JJrs6rZDt4GS9ztIT 1FyItiNkgm0L10k04xoACS5Ft4p9juTAU/C1EL+DU2Rn6na49RjvJENgO8nEth5s55DBZdnCzkjoQ NTlZMNHTVF/PxnH4sYKMcIGP3i3t4T1FWcFEw3zc5xrJFjXjqFmtvzX5c4JWiyooN4RH6DYvqnSji wdByz6aSA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4meu-0007VE-2N; Wed, 27 Jan 2021 15:23:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4mek-0003b1-OE for linux-arm-kernel@merlin.infradead.org; Wed, 27 Jan 2021 15:22:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=uZa34iNLZXzZFgCkFyw7+98Rs100rokiObLD8pmRuUY=; b=BAcWAbZO77qAqngPd5Ht+fcLTH BtH5PCak/+6VXcbkpHQMH6zXPGOK4ZcsawYBY26xSEQzvO29H1d/QTS+PARzXPeJuMrjz+naVwudP lzVzd/vM8CKYh8TVIctvP7m6x4gvsmwF10ucTVdq+KeFNliJhh5nYOKzjb9t4vS6nPUvwzDN1qTu3 ZswSo5G7LwC+SqBq8KmZ0kGkmQI899V54csdeKiy6JE5/NyDdG4C3VFOUOl6tllz9Jxp9Y7dL9KJp WKmYbe945q3E+xHtbtOm7vU9VHsJbGD/WJcMA+QJXhOjFvrBU9XonO+l2/zxOBMebeIY/C93weUEZ GJogTfQw==; Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1l4lp2-0077Uw-9R for linux-arm-kernel@lists.infradead.org; Wed, 27 Jan 2021 14:30:02 +0000 Received: by mail-oi1-x234.google.com with SMTP id h6so2310653oie.5 for ; Wed, 27 Jan 2021 06:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=uZa34iNLZXzZFgCkFyw7+98Rs100rokiObLD8pmRuUY=; b=yHqCtsgEWEiNMgr3d8KZv+/5sk6UJ89UeB9BAL3BFj9o4ADvdN6+u8tG5k/Gl6GYZc CRTLYHmkqbDMJNBBwu7ATXI3LVZ3IK1o5GUuZQ9dXt+kr1DddbDURJoAlR+ccpYq7+4A 9ge0Bsdk//cV/+T4qkXpLSfOjbt3IAIrsi3GWAnheW2ESPhOLsekKEYyrL27yP4Ck5bD QhvOwdZJwS+PDNLXLl4FG6NXmo50Luqyb8czBlyzMcmrqvaE0UGMbopQaONAfs6e6gqU vsJnALNRxfYLw91zQ8zZ8Fw4qBkiuLDwVC84tuO3Xl6VVIjahKvxSMsMbFYtMBLqXe6x qBGA== 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=uZa34iNLZXzZFgCkFyw7+98Rs100rokiObLD8pmRuUY=; b=itxcK2bixODAjMsvceU+uJm+fGwcYsYn+vEg6jVcoGa2GZfdB67jKZyRzTKGVv8lQ9 WqfExOtEAlx8SheB7FkGH3LpWHv/w/49RLKM3Rk/uobioVaBsqnOZpY+atN9qhi5DEJA vRnF5p+9XynuUr0ikDoDh9GBmobiLArgUC95v+boqN3y7P43Bie5VenruTlPmSiWvTGj eyPry05SwJLNop5eU1wUj2CzYvBWyJmEeBkmuAIj/3D382iGSWOB1Y3FnYrUGOTuF4zd soiBB86VNGH49+ZlWssQvVDvR1BnnqQQlczjEiCV0atcNKttn2eozvk7bwXDFM3+FRnX fIHw== X-Gm-Message-State: AOAM531r+9Msfj1kOdCtOYOi+B0mK+n6tQV+EPyz2Wnw+KKuUXNIvERe d2BUl8cUUFHSuPXmaECb3U0jgA== X-Google-Smtp-Source: ABdhPJyhQ4wAJpSym7gzJXvKfZnElEhvu5w+a0f37qggO3T/TY6IL6fTsq4O7xKUQ5kuB6KwcLlssA== X-Received: by 2002:aca:1a17:: with SMTP id a23mr3323036oia.120.1611757702385; Wed, 27 Jan 2021 06:28:22 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm380107otr.16.2021.01.27.06.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 06:28:21 -0800 (PST) Date: Wed, 27 Jan 2021 08:28:19 -0600 From: Bjorn Andersson To: "N?colas F. R. A. Prado" Subject: Re: [PATCH v2 1/4] dt-bindings: leds: Add binding for qcom-spmi-flash Message-ID: References: <20210126140240.1517044-1-nfraprado@protonmail.com> <20210126140240.1517044-2-nfraprado@protonmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210126140240.1517044-2-nfraprado@protonmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210127_143002_064097_CA26C3DB X-CRM114-Status: GOOD ( 21.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lkcamp@lists.libreplanetbr.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Andy Gross , Russell King , Luca Weiss , Rob Herring , linux-leds@vger.kernel.org, Pavel Machek , andrealmeid@collabora.com, Brian Masney , Georgi Djakov , linux-arm-kernel@lists.infradead.org, Dan Murphy 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 26 Jan 08:04 CST 2021, N?colas F. R. A. Prado wrote: > Add devicetree binding for QCOM SPMI Flash LEDs, which are part of > PM8941, and are used both as lantern and camera flash. > = > Signed-off-by: N=EDcolas F. R. A. Prado > --- > Changes in v2: > - Add this commit > = > .../bindings/leds/leds-qcom-spmi-flash.yaml | 94 +++++++++++++++++++ > .../dt-bindings/leds/leds-qcom-spmi-flash.h | 15 +++ > 2 files changed, 109 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-spmi= -flash.yaml > create mode 100644 include/dt-bindings/leds/leds-qcom-spmi-flash.h > = > 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..169716e14f67 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-qcom-spmi-flash.yaml > @@ -0,0 +1,94 @@ > +# 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 > + > + reg: > + maxItems: 1 > + > + flash-boost-supply: > + description: SMBB regulator for LED flash mode > + > + torch-boost-supply: > + description: SMBB regulator for LED torch mode > + > +patternProperties: > + "^led[0-1]$": > + type: object > + $ref: common.yaml# > + > + properties: > + qcom,clamp-curr: > + description: current to clamp at, in uA > + $ref: /schemas/types.yaml#definitions/uint32 > + > + qcom,headroom: > + description: | > + headroom to use. Use one of QCOM_SPMI_FLASH_HEADROOM_* defined= in > + include/dt-bindings/leds/leds-qcom-spmi-flash.h Please make the unit of this property millivolts, instead of describing it indirectly using the defines in the header file. > + $ref: /schemas/types.yaml#definitions/uint32 > + minimum: 0 > + maximum: 3 And you can then list out the valid values here. > + > + qcom,startup-dly: > + description: | > + delay before flashing. Use one of QCOM_SPMI_FLASH_STARTUP_DLY_* > + defined in include/dt-bindings/leds/leds-qcom-spmi-flash.h As above, please describe this in microseconds. > + $ref: /schemas/types.yaml#definitions/uint32 > + minimum: 0 > + maximum: 3 > + > + qcom,safety-timer: > + description: include for safety timer use, otherwise watchdog ti= mer will be used > + type: boolean > + > +required: > + - compatible > + - reg > + - flash-boost-supply > + - torch-boost-supply > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + qcom,leds@d300 { Please no "qcom," in the node name. Regards, Bjorn > + compatible =3D "qcom,spmi-flash"; > + reg =3D <0xd300 0x100>; > + flash-boost-supply =3D <&pm8941_5vs1>; > + torch-boost-supply =3D <&pm8941_5v>; > + > + led0 { > + led-sources =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>; > + default-state =3D "off"; > + qcom,clamp-curr =3D <200000>; > + qcom,headroom =3D ; > + qcom,startup-dly =3D ; > + qcom,safety-timer; > + }; > + }; > +... > diff --git a/include/dt-bindings/leds/leds-qcom-spmi-flash.h b/include/dt= -bindings/leds/leds-qcom-spmi-flash.h > new file mode 100644 > index 000000000000..8bd54a8e831d > --- /dev/null > +++ b/include/dt-bindings/leds/leds-qcom-spmi-flash.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _DT_BINDINGS_LEDS_QCOM_SPMI_FLASH_H > +#define _DT_BINDINGS_LEDS_QCOM_SPMI_FLASH_H > + > +#define QCOM_SPMI_FLASH_HEADROOM_250MV 0 > +#define QCOM_SPMI_FLASH_HEADROOM_300MV 1 > +#define QCOM_SPMI_FLASH_HEADROOM_400MV 2 > +#define QCOM_SPMI_FLASH_HEADROOM_500MV 3 > + > +#define QCOM_SPMI_FLASH_STARTUP_DLY_10US 0 > +#define QCOM_SPMI_FLASH_STARTUP_DLY_32US 1 > +#define QCOM_SPMI_FLASH_STARTUP_DLY_64US 2 > +#define QCOM_SPMI_FLASH_STARTUP_DLY_128US 3 > + > +#endif > -- = > 2.30.0 > = > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel