From patchwork Wed Nov 11 01:14:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322909 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp711170ils; Tue, 10 Nov 2020 17:14:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLdiyriUJKTx9E9s5blzYab6FiaWKKzqPCE9P9fkesXsPz+tvai5kG2neUosHFqg4kqExq X-Received: by 2002:a17:906:ec9:: with SMTP id u9mr22741622eji.400.1605057267019; Tue, 10 Nov 2020 17:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605057267; cv=none; d=google.com; s=arc-20160816; b=h56fq2fbVE2dTL29sOISNEYV5ZHVq5l2c6KOzVQYBRwA21/lKfVEDY3sqmgNbcGqVR l1lTTFokj6fhd35lRW2W4Gb9xBbv2lT/8RRw1I9bq0qXmmjgSi+w4u0nZKzg+CzKfiKl M49ZxTWcbj4yn3VRBOBmOTxxMGlKFuz6E164/yDraLMgkfJls9oEkBHa5/UKNt2ksHOz EvjDGcE63KKrb875SGBWTDV267X2KXnyVO1di+EVUy3KESTrs/mnCQ2mp5rP67tX1+NC 3CTB2/hmzRBNI3JhaP3cJxUj0d/WTB0P1B3MKwi+0JEKZkvkZEgngAc6sc7BfZ9vF+wk pOFQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=K9XBUYhR2UM3o5JW2bLsoKZhteJffpc0EMzzkZ12vrU=; b=SvJMSV0fZKUnvIy9ni/6HyHg1xjKXM68KUWRid9FxH5eGQwQq6PTGQlMnQj+aQugGV Nf5F6+a5/iTGqwHr02n2DcFDSCM3QzTFM6sGDy6VCDnBbRkxBZWBmlU6cr5325TKBViQ VnNKtVS5BWH82+MnPKTFuDKPXTE0yK6fwqSPOBuFfDl1Ofgry535K9oebP8Fri1fDnEK p2vPMNS4b+uZblBUb+k+F7vg0lNvsRRG59bnZMN9PcCy5qEuWHSfEB2WRMTTgshgRTp6 YdnM45yzaZ9/GDp98Dwg+HK5q6xRModYBv4QquHqmoHsc8nPgfZ2t8dtTEsy4wy4oTSV nSXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PqWe0YWu; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si401789edw.241.2020.11.10.17.14.26 for ; Tue, 10 Nov 2020 17:14:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PqWe0YWu; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732568AbgKKBOZ (ORCPT ); Tue, 10 Nov 2020 20:14:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732123AbgKKBOY (ORCPT ); Tue, 10 Nov 2020 20:14:24 -0500 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1AA5C0613D1 for ; Tue, 10 Nov 2020 17:14:23 -0800 (PST) Received: by mail-lf1-x144.google.com with SMTP id r9so844259lfn.11 for ; Tue, 10 Nov 2020 17:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K9XBUYhR2UM3o5JW2bLsoKZhteJffpc0EMzzkZ12vrU=; b=PqWe0YWuTcOTlgUfpZFss7Jov1FIYRzUvvdoVxG+fHvnGDpWZ1V5zg3/Jw4zzy0D7f NDLUnTW8HfsM5IfYWcrZj0JTEp+m7RNX23gVM5ZFSojdvUhdswtkQog/NBbSFPoMGdYI 5d+CrTzDDPzp1kYGLPkkRKoLjc+7iaMFDJwB4ChFPuhqXkMzXf5EQUoWU46nSJEepKm/ o8o1T+n6AXiHc3IMJ1HAYsI6zVMkUM+ovSw/v6mz/nU0OL4BYPqaCpJrj+G+pkr2TzPR /1QTr02v3z5wDsIqrcSWUzcgX7ndIqTqfXTm5j5BkMUs6vNkWlXt0VtTIbr6vOE5qTBY COPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K9XBUYhR2UM3o5JW2bLsoKZhteJffpc0EMzzkZ12vrU=; b=cFbH//SZ1o+aGKbpK+R355IUCp9cXshqm+u8WhOHKx+DwrUxlKLsapa0p67bTCzhw5 O7wU1VwlKV3MBc6jQiGF5HLsuWKXynSVXgXgUjPH4crdJbPWc2JonUvEZOS/rUYN+DBw hJKbfaHxVXqxui5oqo6AEV6arvyZPRVUsyfrJ4b5kxj6UvtHugfMX9x3RMTPN8q/XMU5 AiW5qCvt/cy5xgExjQQ5Qf7oP+qxVJr+O+i/jP1GgmByU8zMVdR8h5hzGafliOl2K6HJ AXqhRqlAYQTJl8oXFEvAvdaRu23+VVLwebXSz4q+sFgYAX8xCIoQbYcGn9hqTn4qwtJX 4hTA== X-Gm-Message-State: AOAM53051Z8kSKwlquv6XED982wjFsHdAJGQlBq/+pdFSsT0rdIERFlZ nL2cOGg3rmU5b2o4FazWJJdfzg== X-Received: by 2002:a19:587:: with SMTP id 129mr7610447lff.189.1605057262147; Tue, 10 Nov 2020 17:14:22 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id r9sm47836ljd.23.2020.11.10.17.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 17:14:21 -0800 (PST) From: Linus Walleij To: Jacek Anaszewski , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Linus Walleij , Sakari Ailus , newbytee@protonmail.com, Stephan Gerhold , devicetree@vger.kernel.org Subject: [PATCH 1/2 v3] dt-bindings: leds: Add DT binding for Richtek RT8515 Date: Wed, 11 Nov 2020 02:14:16 +0100 Message-Id: <20201111011417.2275501-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a YAML devicetree binding for the Richtek RT8515 dual channel flash/torch LED driver. Cc: Sakari Ailus Cc: newbytee@protonmail.com Cc: Stephan Gerhold Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Add Sakari to CC - Resend ChangeLog v1->v2: - Explicitly inherit function, color and flash-max-timeout-us from common.yaml - Add "led" node as required. --- .../bindings/leds/richtek,rt8515.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/richtek,rt8515.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml new file mode 100644 index 000000000000..0d8bb635370c --- /dev/null +++ b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT8515 1.5A dual channel LED driver + +maintainers: + - Linus Walleij + +description: | + The Richtek RT8515 is a dual channel (two mode) LED driver that + supports driving a white LED in flash or torch mode. + +properties: + compatible: + const: richtek,rt8515 + + enf-gpios: + maxItems: 1 + description: A connection to the 'ENF' (enable flash) pin. + + ent-gpios: + maxItems: 1 + description: A connection to the 'ENT' (enable torch) pin. + + led: + type: object + $ref: common.yaml# + properties: + function: true + color: true + flash-max-timeout-us: true + +required: + - compatible + - ent-gpios + - enf-gpios + - led + +additionalProperties: false + +examples: + - | + #include + #include + + led-controller { + compatible = "richtek,rt8515"; + enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; + ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>; + + led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + };