Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1782333ybk; Mon, 11 May 2020 04:14:45 -0700 (PDT) X-Google-Smtp-Source: APiQypKHcCS8b0WqNWb5qjpBU7PswinMFQjc5iMP5LhBGC4+f7DWM4U8X37QlttpkPyzjGLJOr/k X-Received: by 2002:a05:6402:2035:: with SMTP id ay21mr5644558edb.279.1589195685477; Mon, 11 May 2020 04:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589195685; cv=none; d=google.com; s=arc-20160816; b=ptJ+rmPDfknDIQ3gJQ3Z55mJYVxsdpTzSHpWamgtNVQtIuwknEw2kqCHNqRuNwQb5o NsCbLoqqkrLcxdbNpilnzK6vNQHCzHTCqHVlaXX7lKqJLtx9/Wuf0Q7dJSbZ+N2qwKpt s/jSsp8YLlMN8sSdvQibZND9F+W25gjErAle1n7CSVKYld8pEJzFJo3l6dG3o2YfAc09 ZEj6WYMKEBHRHBK9JqnClmhwKVKHPT7duGU73GIyq/nbjPodTo/cZPtN6xxXOHhLCMA0 pYgNve8P5GkGiwwkWR0F5yyc5kPXaWLmnGGHmnGCdicLdGTgqFrfoZ/dnnaOz5nXlH8r ivbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pkr+IhGoxSKRTkwbFYF/J9fJ7I9LmIIqclNwQQn9boY=; b=mDGuhS+PZ849uo41FS9SCfKLmzVr8Sq/aYGgS8RcPJSwx/on2EROXt0mbWd8sy4WRZ SqTqx8LKMORHa8BXvz3vXSZEZLPgXp4E+suB/0YlA7Wr8U0sujgyos7bJTjl4ctEndA+ Arsx0laj9yO9Da4Z8ySraqOOi2EjmWpJCMSmj1m+FvileASvDxw0mmlx2yX3ZKVIuir3 4WcBlkbpbn0LleuKhI3h28fhM72qhD0/HvfhNCBnJFAlHiN7xPnfCjBZDXnhBV+2RxTY U+YHip2x6ip2/dFgjDozbVOLvTy1/1fgxz1ZyHfXHk/j2W7T5tt0uojjP/VMrMgsRmef 2E1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ASByneVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si5662617ejo.108.2020.05.11.04.14.22; Mon, 11 May 2020 04:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=ASByneVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729465AbgEKLMj (ORCPT + 99 others); Mon, 11 May 2020 07:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725993AbgEKLMh (ORCPT ); Mon, 11 May 2020 07:12:37 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF021C061A0C; Mon, 11 May 2020 04:12:36 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id v5so3055343lfp.13; Mon, 11 May 2020 04:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pkr+IhGoxSKRTkwbFYF/J9fJ7I9LmIIqclNwQQn9boY=; b=ASByneVyqS6GGPi7PjOhOpJR6CfvRyN80E4nXBDlq1z0B++sV0+0/uc/iEXMGBnii2 PEWxHT+2gsWx6opIbgqVqM3vybFWGxq8OF7OR93fg5oBNnyL8GpBQmsNQXKilTTdcpTp lmw+xq2ZqJzMIhHGBEG/uKLy/9MYAOuWRN2O5y56//+LRKgQymGp0ZrHJ3jEJ+mvtMcV FM/UYZ/pKod372buiKW+kzImQGFDRUH7RbVoe9/EzTt3Rd70he8tq5vdFPucAIQUaPCU 4/749Zn4yhGK5d00gN+D0tqW6L12vrtxBukT7CXr5510i0Udxlwl5QmrPRRNwNPPkjOE 5tqg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=pkr+IhGoxSKRTkwbFYF/J9fJ7I9LmIIqclNwQQn9boY=; b=bprX/BtqVwugxfz10EHFppuiizqYDWFA2pTFsjrFMojaTHl3ZyvlaR+BdpPwal3yOi n+zM0BBsRfpC5j19loqN7rCnP7+YpcZGLPHuxXJRbgGmA/lwZ6ZgRrxsJmvmHTuKt++z CQYNl71Dsqd/LBbBF+lNOQe2wOZRyKPItB0C5DBGML6SLxf6eKNcKxNYKhgj0yI/3fIP xfQ3rniiof420XoNEuYI4tbHWMHbO96kR9t2i6HSO6tAx1gKGFnsm1llElZndGBF4j03 rgWbLs0mfBAbwccQ6jp5oqVHIpf6lrOo99nhdFqnR1mRm2kdqOmf1GjK/y/nCZEwFSOh xgRw== X-Gm-Message-State: AOAM533Vw3BeBo6ONkl03X/C3sI95YMB2f6vwnZ6z69qg7DVn6Pjbxh3 H/9h/mPo4xqQXNYcOSueWyE= X-Received: by 2002:a19:cc07:: with SMTP id c7mr10778072lfg.163.1589195555425; Mon, 11 May 2020 04:12:35 -0700 (PDT) Received: from localhost.localdomain ([2a01:540:28d4:e600:cdb2:b5ce:8f29:26b7]) by smtp.gmail.com with ESMTPSA id a10sm9498128ljp.16.2020.05.11.04.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 04:12:34 -0700 (PDT) From: nikitos.tr@gmail.com To: pavel@ucw.cz Cc: dmurphy@ti.com, robh+dt@kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH v2 2/3] dt-bindings: leds: Add binding for aw2013 Date: Mon, 11 May 2020 16:11:27 +0500 Message-Id: <20200511111128.16210-2-nikitos.tr@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200511111128.16210-1-nikitos.tr@gmail.com> References: <20200511111128.16210-1-nikitos.tr@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikita Travkin Add YAML devicetree binding for AWINIC AW2013 3-channel led driver Signed-off-by: Nikita Travkin --- .../devicetree/bindings/leds/leds-aw2013.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-aw2013.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-aw2013.yaml b/Documentation/devicetree/bindings/leds/leds-aw2013.yaml new file mode 100644 index 000000000000..f118721df1e8 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-aw2013.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AWINIC AW2013 3-channel LED Driver + +maintainers: + - Nikita Travkin + +description: | + The AW2013 is a 3-channel LED driver with I2C interface. It can control + LED brightness with PWM output. + +properties: + compatible: + const: awinic,aw2013 + + reg: + maxItems: 1 + + vcc-supply: + description: Regulator providing power to the "VCC" pin. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-2]$": + type: object + allOf: + - $ref: common.yaml# + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 2 + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + #address-cells = <1>; + #size-cells = <0>; + + vcc-supply = <&pm8916_l17>; + + led@0 { + reg = <0>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + + led@1 { + reg = <1>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + + led@2 { + reg = <2>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + }; + }; +... -- 2.20.1