From patchwork Fri Apr 21 07:53:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Zanders X-Patchwork-Id: 86167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp903855vqo; Fri, 21 Apr 2023 01:16:51 -0700 (PDT) X-Google-Smtp-Source: AKy350bqOOX02A/NeqwVqNwye4JkndY0HmeHqTjHzEKU3Qj8xvmLu/W502hxQ7dj4ou1LjRa9nGT X-Received: by 2002:a05:6a21:2d8d:b0:ec:707f:7dc7 with SMTP id ty13-20020a056a212d8d00b000ec707f7dc7mr5029852pzb.33.1682065011325; Fri, 21 Apr 2023 01:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682065011; cv=none; d=google.com; s=arc-20160816; b=sEF81odR8eTZAoZ7XKDfGsVmo1YmCbmoemFIUo462gUL3piSt87QyuGnhaA4rYRXX/ QljcPCxytY1N9Evy8iy7PFis6Hnu+gD96LnBN2Jponeu7YsqIItz1hQOxqUlf/OaVqxb H6Pj8Xa7CLz4n4G9ZWwBaQCnFeYw8S1knnmHklXVEQV32u79BR8SZucT/QxuGk3xn3/H H4g4KgOtHPlqJ2tb7bO9UxUkJVUkmTYIlv3eKuXICkr2rpssSw/00mRCWB+PgOqWjPnI h33e0VPsQlpXcH4VqLJgGpv//ytOE8XknELLCDHfDH+WhUTJ0qNUHjZPDh3ZP5NQJo0b ihWQ== 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:date:subject:cc:to:from :dkim-signature; bh=P/ZpcQ9NIqFHjhvx0ngEtTv4dAJPVMJ7EISKXYvQAAs=; b=0EcYLedZlF+TErH7qY7ozuCI1PJ2zt55YDzUxtgvshoGgOzyhv7rIXVpWtLBPjJzxC 4jMVLLrNwrPYow57MCdz5JEiQOEF0dv/8s8L1bzeB9xwnBfMxJ8AG7/wERG//xdBu44a GCm9+uwfmEdsMWc7dNbe6EqClikTMGRHi7vnkIRIDtRZUWasoLGqJz6yyQwnmnGXkdpX 1hgz2/ggrMbh3gRW0E+rPFQ8DFcK1eW1e1B7UNN5RGiwXbj5Kg8Vs9VRMjdNZD+lloF/ t8NIYN/RTe8k+DAKiGt5R9rez2zNQ3bnHONa8dqeYHQjmyf6NMccuaskZeuKH4RppPFE QmNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mind.be header.s=google header.b=BHlMJvYJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a6540cb000000b00513234112a7si3471282pgp.883.2023.04.21.01.16.36; Fri, 21 Apr 2023 01:16:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mind.be header.s=google header.b=BHlMJvYJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231446AbjDUHxV (ORCPT + 99 others); Fri, 21 Apr 2023 03:53:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231327AbjDUHxP (ORCPT ); Fri, 21 Apr 2023 03:53:15 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA179902E for ; Fri, 21 Apr 2023 00:53:11 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5050497df77so1966189a12.1 for ; Fri, 21 Apr 2023 00:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1682063590; x=1684655590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P/ZpcQ9NIqFHjhvx0ngEtTv4dAJPVMJ7EISKXYvQAAs=; b=BHlMJvYJT9gYXlzOIQmmVpfVb0CBhuWzkOwXRjI7ferZ2YvexT9oXFEF+ZX8pF0dHA arpdbDhrseUsOF7xgJK85M3MPneF8kWk1xmEA1bn9H7EtQC/EOzkWhTotFYPIceIBLRP aR7dWBQl3vvg91cf1yf7A9BdwnyAnS15sf+jL1dTpzTQ0mVMDop6yUxVTXZjC2mBdLXE tKXPMrMDPvt+a0ffDrcb5D6dHg9Ybnonf7mOLxhl/3CCP9LTHc+6EWeXKCQGi61nLDIf AF7+mY3RudNDaaHJyPFM0grCGO0OBU0i0Fzh3pbJ/6xiaWYlVaaAps15pgBl9/Ap8Tgs jozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682063590; x=1684655590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P/ZpcQ9NIqFHjhvx0ngEtTv4dAJPVMJ7EISKXYvQAAs=; b=PumitIkc8b3u1CbckAv7TJ4gQphDphq2v7ZeOIYXfjxW/2YoFUmP+Qpu1+xTXY8BEe iNRjg4InUfHFXr69VwNfnYbKRjimJyHwUl2rkwxyk20boO+T85B9k27ouROD8kOL97N7 exBeUY0yi8gzz7ppjAqh7zzNKw8doFNaLvRQbwS/RGImzk0IkCIoXf6N7A0PVfThYUUv h3JhCOjaSD/MDDUaMLlSLM2CelYKlB50b/meYEbNyNnepCDpFUixP9Gla+hlbbIAGX2A BOHosAJM3ERstGeeHEcRhrLbpic01EXYDxVtr4jxhPF60LAftGncxO16/quaeUZt2uK7 5HBw== X-Gm-Message-State: AAQBX9fWI4NSzx312FSHNJ7TMJxnf6QWhNjIEgWmz0GHN+s7FkuLGXpa S79cmVNDOC95AVeeBytypazDzw== X-Received: by 2002:a17:906:b6c4:b0:94a:4fc5:4c2e with SMTP id ec4-20020a170906b6c400b0094a4fc54c2emr1305414ejb.49.1682063590295; Fri, 21 Apr 2023 00:53:10 -0700 (PDT) Received: from dtpc.zanders.be (78-22-137-109.access.telenet.be. [78.22.137.109]) by smtp.gmail.com with ESMTPSA id vp3-20020a170907a48300b0094f14286f86sm1716329ejc.48.2023.04.21.00.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 00:53:09 -0700 (PDT) From: Maarten Zanders To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Jacek Anaszewski Cc: Maarten Zanders , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v8 1/2] dt-bindings: leds-lp55xx: add ti,charge-pump-mode Date: Fri, 21 Apr 2023 09:53:04 +0200 Message-Id: <20230421075305.37597-2-maarten.zanders@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20230421075305.37597-1-maarten.zanders@mind.be> References: <20230421075305.37597-1-maarten.zanders@mind.be> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763773001683540612?= X-GMAIL-MSGID: =?utf-8?q?1763773001683540612?= Add a binding to configure the internal charge pump for lp55xx. Signed-off-by: Maarten Zanders Reviewed-by: Krzysztof Kozlowski --- Notes: v1: implement as bool to disable charge pump v2: rewrite to use string configuration, supporting all modes v3: simplification by replacing string option by u8 constant, removing previous Reviewed-by tags as it's a complete rewrite of the patch. v4: added notes v5: dual license, change property type to u32 v6: change license type for leds-lp-55xx.h to preferred tag v8: documentation: add default & maximum constraints .../devicetree/bindings/leds/leds-lp55xx.yaml | 10 ++++++++++ include/dt-bindings/leds/leds-lp55xx.h | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 include/dt-bindings/leds/leds-lp55xx.h diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml index ae607911f1db..058be1fedbc8 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml @@ -66,6 +66,14 @@ properties: '#size-cells': const: 0 + ti,charge-pump-mode: + description: + Set the operating mode of the internal charge pump as defined in + . + $ref: /schemas/types.yaml#/definitions/uint32 + default: 3 # auto + maximum: 3 + patternProperties: '^multi-led@[0-8]$': type: object @@ -152,6 +160,7 @@ additionalProperties: false examples: - | #include + #include i2c { #address-cells = <1>; @@ -164,6 +173,7 @@ examples: reg = <0x32>; clock-mode = /bits/ 8 <2>; pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ + ti,charge-pump-mode = ; led@0 { reg = <0>; diff --git a/include/dt-bindings/leds/leds-lp55xx.h b/include/dt-bindings/leds/leds-lp55xx.h new file mode 100644 index 000000000000..a4fb4567715d --- /dev/null +++ b/include/dt-bindings/leds/leds-lp55xx.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +#ifndef _DT_BINDINGS_LEDS_LP55XX_H +#define _DT_BINDINGS_LEDS_LP55XX_H + +#define LP55XX_CP_OFF 0 +#define LP55XX_CP_BYPASS 1 +#define LP55XX_CP_BOOST 2 +#define LP55XX_CP_AUTO 3 + +#endif /* _DT_BINDINGS_LEDS_LP55XX_H */