From patchwork Thu Feb 2 10:10:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Zanders X-Patchwork-Id: 649886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDE1EC05027 for ; Thu, 2 Feb 2023 10:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232526AbjBBKKw (ORCPT ); Thu, 2 Feb 2023 05:10:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232129AbjBBKKv (ORCPT ); Thu, 2 Feb 2023 05:10:51 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A90558759A for ; Thu, 2 Feb 2023 02:10:46 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id q19so1460631edd.2 for ; Thu, 02 Feb 2023 02:10:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; 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=PZ/eU/DKOSJTbU1YDMmaQL1fq94Z2preFzmC+8H/Gjo=; b=dlq9Ei+ies+wC8rqHr4+iStcSSd1YBuNlbxPxpucw6pmy9CAs13nEOikZ5BWFHXrSt 4E383ZAN2OJF0+kvlbvckkXieElTtInDird2S1kQz5ZSa80t4XsOPqaKZGKoPZBCALjM 5aXtX82oWDSwIyM9l2GGvmx0aD6zoiE5MYwUC6lVHU2vYkKYLJF0Zppnkdp5bmzuMhN3 6sozw9E9vt4QmVqF5tIYvXPIhbReVYOvJzvOPWmpr16h2SzI8g2E/Xt47NBF3gBRgij3 rshmwuAwsuWwh/YZt3QOCDWXsnnL2QqwkSXHypFmmQpT5YFDPMjsy73hkk0yTK5KKsKr wILg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=PZ/eU/DKOSJTbU1YDMmaQL1fq94Z2preFzmC+8H/Gjo=; b=B69MTKKo7T0kQOCe3D+vw/wkV9fEvWjAmaaJx5ud94nvHFLuRwwxrqxyON1uUeGx1h cif8XKw3nAaoGHeRWs9SIoPUSGgeOtFdNODlv2tyZoN25feQ7eE475CjYrc054NXk4V1 iY0OHhG9+o2M459FGPJH7v6sB1aGzjsKKtnWJ18RjmXMOSS/z30m5NX4o/2DRhYrrj7m hTrGB43FSu2VrERxGwFoO+xgj1OjkNqAfmVUUD03BXQEMOv5yNr6jCta4ZqOQWWy7wky 8J0YMOYtn72U270QKcT5jr1QWlNUTFzwddCczUmpLwTx2evw0h5d88BGXJJgTsiqZ11p 4cYA== X-Gm-Message-State: AO0yUKUVXZGAP8kKgPxVmo8X/Sw7D5a+veXUY6UjbpNtxJWgf2AD0gPs ygLRi7kJpZyfnPrXdhDkcc407g== X-Google-Smtp-Source: AK7set/zjGx/vZqFBsdgw8PYe1J4UVTDb+ioEW+bafSh0azWJcgBdFx2BitsblDAuFdFUgD+FLVv/A== X-Received: by 2002:a05:6402:1504:b0:499:70a8:f91a with SMTP id f4-20020a056402150400b0049970a8f91amr5501371edw.19.1675332645239; Thu, 02 Feb 2023 02:10:45 -0800 (PST) Received: from dtpc.zanders.be (78-22-137-109.access.telenet.be. [78.22.137.109]) by smtp.gmail.com with ESMTPSA id t13-20020a50d70d000000b00458b41d9460sm11155816edi.92.2023.02.02.02.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 02:10:44 -0800 (PST) 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 Subject: [PATCH v4 1/2] dt-bindings: leds-lp55xx: add ti,charge-pump-mode Date: Thu, 2 Feb 2023 11:10:31 +0100 Message-Id: <20230202101032.26737-2-maarten.zanders@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20230202101032.26737-1-maarten.zanders@mind.be> References: <20230202101032.26737-1-maarten.zanders@mind.be> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a binding to configure the internal charge pump for lp55xx. Signed-off-by: Maarten Zanders --- 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 .../devicetree/bindings/leds/leds-lp55xx.yaml | 8 ++++++++ include/dt-bindings/leds/leds-lp55xx.h | 10 ++++++++++ 2 files changed, 18 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..22e63d89d770 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml @@ -66,6 +66,12 @@ properties: '#size-cells': const: 0 + ti,charge-pump-mode: + description: + Set the operating mode of the internal charge pump as defined in + . Defaults to auto. + $ref: /schemas/types.yaml#/definitions/uint8 + patternProperties: '^multi-led@[0-8]$': type: object @@ -152,6 +158,7 @@ additionalProperties: false examples: - | #include + #include i2c { #address-cells = <1>; @@ -164,6 +171,7 @@ examples: reg = <0x32>; clock-mode = /bits/ 8 <2>; pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ + ti,charge-pump-mode = /bits/ 8 ; 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..8f59c1c12dee --- /dev/null +++ b/include/dt-bindings/leds/leds-lp55xx.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#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 */