From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 816902BCF45; Thu, 28 May 2026 02:34:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779935672; cv=none; b=dEiitFjiwRMEBaVS4CjOF/0wVvA1p1P4C7Y8co2vdBYOL/wKomHFYSJb3O9nXrcIVxqMsgVtOcgBYvNLaslgsVMjcH7lkdQ/jjjLrLTcHPF7fCT23xwyEG5SJNNVbM7/SzXh2XaG8qZKZTgflfjlOAiv2SyEwef0dg4bB2gCT6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779935672; c=relaxed/simple; bh=cWFq0UmsChy1UMKhJ3jNAc6iyXXgrydkyp2h6htMuew=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=a+wbvEj0U7JTXDdV3p3EhIS5f7oaM+i0CRqiydIH62KmEDDMi1A7sywlTw4K8WF+poqyjrShOrARp6+TucldQhw7L7YbdRPQDtIOOSh6neBg76E+UxH99NCRMc+V1iN31zxxlL/TxWvlM2YaVKBCV8rihqGW6O4BRcxUdt6Qsec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t3Xkv2Tu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t3Xkv2Tu" Received: by smtp.kernel.org (Postfix) with ESMTPS id 27998C2BCB4; Thu, 28 May 2026 02:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779935672; bh=cWFq0UmsChy1UMKhJ3jNAc6iyXXgrydkyp2h6htMuew=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=t3Xkv2Tuy3HGPA+x+efSpVrJ4fXs6qm7x1cFQ16Fk8GOlXZzqJ6PCi6qS3rzDJoN8 ZYhIJo/zsKyDJCMSKNniAFs5Gs2sb/t6bDHfoJ3eCQ0PcQI6otmT8wNPCwXlelYaQz V4GYErK3yV+Oe0mIegO0bZyWCB9D1Joyh2LLtso2dP5/l3M7vMrUOmcuQjMXfV33Ai l1iqTylfAUXfWfex8enm7AXQdOHkOrvnY1vJ2KF7yba9evGv26OfgFtXkn+PXRRpC2 xcetoKj0cmeh+Y3ASuIHcRGMyCekEIxN5SnxWeEp24shZcQGVThWoOINg6Z3/GVZYi h5Jl8gAwaPbwA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1289ACD6E44; Thu, 28 May 2026 02:34:32 +0000 (UTC) From: Rudraksha Gupta via B4 Relay Date: Wed, 27 May 2026 19:34:30 -0700 Subject: [PATCH v6 1/3] dt-bindings: leds: rt8515: Support single-GPIO flash ICs with vin supply Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260527-expressatt_camera_flash-v6-1-de0f150024e4@gmail.com> References: <20260527-expressatt_camera_flash-v6-0-de0f150024e4@gmail.com> In-Reply-To: <20260527-expressatt_camera_flash-v6-0-de0f150024e4@gmail.com> To: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, Rudraksha Gupta , Conor Dooley X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1779935671; l=2722; i=guptarud@gmail.com; s=20240916; h=from:subject:message-id; bh=zVrQqx9DX85PpInFmz437RLTadxI5BhJ9KjSu1CJI9w=; b=9br2+hzBNCL2YlZb5RbnwvO/7VUwaI0dFKogVbWsOPN5yREx/vtJ4hNiMBQ7O35T8kaCW/F7J QRn6EJLHBD+BpUwzAmDyu6Q23uNxSArfVVKBZlBMQqqni9kDkfBoSbT X-Developer-Key: i=guptarud@gmail.com; a=ed25519; pk=ETrudRugWAtOpr0OhRiheQ1lXM4Kk4KGFnBySlKDi2I= X-Endpoint-Received: by B4 Relay for guptarud@gmail.com/20240916 with auth_id=211 X-Original-From: Rudraksha Gupta Reply-To: guptarud@gmail.com From: Rudraksha Gupta Some flash ICs use the same one-wire pulse-count protocol as the RT8515 but have only a single enable line for both flash and torch modes, plus an optional input voltage supply (e.g. a GPIO-controlled fixed regulator) that gates power to the chip. Make ent-gpios optional and add a vin-supply property to support these variants. Add a oneOf constraint requiring exactly one of ent-gpios or vin-supply. Add a binding example showing the single-GPIO configuration with an input supply. Assisted-by: Claude:claude-opus-4.6 Acked-by: Conor Dooley Reviewed-by: Linus Walleij Signed-off-by: Rudraksha Gupta --- .../devicetree/bindings/leds/richtek,rt8515.yaml | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml index 0356371a6b01..ab3c5139132c 100644 --- a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml +++ b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml @@ -15,6 +15,10 @@ description: | current for each mode is defined in hardware using two resistors RFS and RTS. + Some flash ICs use the same one-wire pulse-count protocol but have + only a single enable line for both flash and torch modes. For these + single-channel variants, only enf-gpios is needed. + properties: compatible: const: richtek,rt8515 @@ -26,6 +30,11 @@ properties: ent-gpios: maxItems: 1 description: A connection to the 'ENT' (enable torch) pin. + Not present on single-channel flash ICs that use only one enable + line for both flash and torch modes. + + vin-supply: + description: Optional input supply for the flash IC. richtek,rfs-ohms: minimum: 7680 @@ -81,10 +90,15 @@ properties: required: - compatible - - ent-gpios - enf-gpios - led +oneOf: + - required: + - ent-gpios + - required: + - vin-supply + additionalProperties: false examples: @@ -108,4 +122,22 @@ examples: }; }; + - | + /* Single-channel flash IC with input supply */ + #include + #include + + led-controller { + compatible = "richtek,rt8515"; + enf-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + vin-supply = <&flash_reg>; + richtek,rfs-ohms = <16000>; + + led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + }; + ... -- 2.54.0