From nobody Fri Apr 17 22:37:29 2026 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 9A5A6C433EF for ; Thu, 21 Jul 2022 16:06:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbiGUQGc (ORCPT ); Thu, 21 Jul 2022 12:06:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbiGUQGU (ORCPT ); Thu, 21 Jul 2022 12:06:20 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C6BF2CCA6 for ; Thu, 21 Jul 2022 09:06:16 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id q7so2344055lji.12 for ; Thu, 21 Jul 2022 09:06:16 -0700 (PDT) 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=bOAD0WaXsD+JG0JF1mCsUCytEFM/ny7YDKpLSwYvJzw=; b=KwMyPMPbKbXkjxL+uTj15OnFAIiUv/+VHaeyhgGJ41oSthr9EFoxwuMi3d+sQGMTSz FNqmFEb9D+N/xww/HobSo9uGKWDT4FVhC3c8HSSYCIc2wdBPagpaulpxuSE21DC7M+69 sbHUR8UKkuY81Fdc3y+SFU7/s3wfh8GX45g1RfcJZQPmjDb9ouTb8GJxka1m1sGV20o3 JzX1VJczogIgyS129FHesh5pe/+gkFq1NPQpoVrk4kAs+r4xk6kPkJ3mkh80hj7Vv7FT d3dEUL1FXLMCrFYhvGEFpJAdepfYkXEByi4F84bPppa62UyP31TsIot/7k0oCaDNPKxH iRHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bOAD0WaXsD+JG0JF1mCsUCytEFM/ny7YDKpLSwYvJzw=; b=pPmACBl1dUoCq6zcSYbjedRUPUpHaN0txrchxLM6yDExoL77YdTni1Bd3BVE4nonRB ppsSmzsrC1RhseoYTHvQCmPrnjiIHVbduwnAYNq/V5A5dCVWg09BS0d2HTOxn47BuJP9 5W2BwLU+zN32kbWh4W7n5UsLKlDgL9xhkxlVsXftSDZJ1raYzQI8FP+7e0VGgAv+fwkM h0zdIR+K9D9mjKhN7F7iFkOiMFSiRR5hrAuCVYl8s0YeWMrnrwUnXUPk3Hp81JZ68THp eMoxBQAm7OBG1APR26dVrRxbuNdI1Y9J8YHXWhChpsNayKKVAEY2W/fEUCihB7GShQSp K6ew== X-Gm-Message-State: AJIora/khjKnF1B1NEv+gDvee+p260PzvjFW+I84RGwt/9/DzVm5dQY9 PF0uIy6fGrRbbA50gRhmvpaGqA== X-Google-Smtp-Source: AGRyM1tKdUEyiXgh7nWkXj/5n2r75XTsJnX4oy9eT8joUGvGn03QNWbTxnwlN9zWpozfFN4bD8gvgw== X-Received: by 2002:a05:651c:238b:b0:25d:eabe:225a with SMTP id bk11-20020a05651c238b00b0025deabe225amr504758ljb.28.1658419574658; Thu, 21 Jul 2022 09:06:14 -0700 (PDT) Received: from krzk-bin.. (89-162-31-138.fiber.signal.no. [89.162.31.138]) by smtp.gmail.com with ESMTPSA id 8-20020ac25f08000000b0048a6bb9418esm511171lfq.295.2022.07.21.09.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 09:06:14 -0700 (PDT) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Jacek Anaszewski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Rob Herring Subject: [RESEND PATCH v2] dt-bindings: leds: skyworks,aat1290: convert to dtschema Date: Thu, 21 Jul 2022 18:06:11 +0200 Message-Id: <20220721160611.250274-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Convert the Skyworks Solutions, Inc. AAT1290 Current Regulator bindings to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Jacek Anaszewski --- Hi, This is waiting on the lists for a month: https://lore.kernel.org/all/20220620175033.130468-2-krzysztof.kozlowski@lin= aro.org/ so maybe it could be merged via LED or DT binding tree? Best regards, Krzysztof --- .../devicetree/bindings/leds/leds-aat1290.txt | 77 --------------- .../bindings/leds/skyworks,aat1290.yaml | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 77 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-aat1290.txt create mode 100644 Documentation/devicetree/bindings/leds/skyworks,aat1290= .yaml diff --git a/Documentation/devicetree/bindings/leds/leds-aat1290.txt b/Docu= mentation/devicetree/bindings/leds/leds-aat1290.txt deleted file mode 100644 index 62ed17ec075b..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-aat1290.txt +++ /dev/null @@ -1,77 +0,0 @@ -* Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs - -The device is controlled through two pins: FL_EN and EN_SET. The pins when, -asserted high, enable flash strobe and movie mode (max 1/2 of flash curren= t) -respectively. In order to add a capability of selecting the strobe signal = source -(e.g. CPU or camera sensor) there is an additional switch required, indepe= ndent -of the flash chip. The switch is controlled with pin control. - -Required properties: - -- compatible : Must be "skyworks,aat1290". -- flen-gpios : Must be device tree identifier of the flash device FL_EN pi= n. -- enset-gpios : Must be device tree identifier of the flash device EN_SET = pin. - -Optional properties: -- pinctrl-names : Must contain entries: "default", "host", "isp". Entries - "default" and "host" must refer to the same pin configuration - node, which sets the host as a strobe signal provider. Entry - "isp" must refer to the pin configuration node, which sets the - ISP as a strobe signal provider. - -A discrete LED element connected to the device must be represented by a ch= ild -node - see Documentation/devicetree/bindings/leds/common.txt. - -Required properties of the LED child node: -- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt -- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.t= xt - Maximum flash LED supply current can be calculated = using - following formula: I =3D 1A * 162kohm / Rset. -- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common= .txt - Maximum flash timeout can be calculated using fol= lowing - formula: T =3D 8.82 * 10^9 * Ct. - -Optional properties of the LED child node: -- function : see Documentation/devicetree/bindings/leds/common.txt -- color : see Documentation/devicetree/bindings/leds/common.txt -- label : see Documentation/devicetree/bindings/leds/common.txt (deprecate= d) - -Example (by Ct =3D 220nF, Rset =3D 160kohm and exynos4412-trats2 board with -a switch that allows for routing strobe signal either from the host or from -the camera sensor): - -#include "exynos4412.dtsi" -#include - -led-controller { - compatible =3D "skyworks,aat1290"; - flen-gpios =3D <&gpj1 1 GPIO_ACTIVE_HIGH>; - enset-gpios =3D <&gpj1 2 GPIO_ACTIVE_HIGH>; - - pinctrl-names =3D "default", "host", "isp"; - pinctrl-0 =3D <&camera_flash_host>; - pinctrl-1 =3D <&camera_flash_host>; - pinctrl-2 =3D <&camera_flash_isp>; - - camera_flash: led { - function =3D LED_FUNCTION_FLASH; - color =3D ; - led-max-microamp =3D <520833>; - flash-max-microamp =3D <1012500>; - flash-max-timeout-us =3D <1940000>; - }; -}; - -&pinctrl_0 { - camera_flash_host: camera-flash-host { - samsung,pins =3D "gpj1-0"; - samsung,pin-function =3D <1>; - samsung,pin-val =3D <0>; - }; - - camera_flash_isp: camera-flash-isp { - samsung,pins =3D "gpj1-0"; - samsung,pin-function =3D <1>; - samsung,pin-val =3D <1>; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml b= /Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml new file mode 100644 index 000000000000..a6aaa92dbccd --- /dev/null +++ b/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/skyworks,aat1290.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs + +maintainers: + - Jacek Anaszewski + - Krzysztof Kozlowski + +description: | + The device is controlled through two pins:: FL_EN and EN_SET. The pins w= hen, + asserted high, enable flash strobe and movie mode (max 1/2 of flash curr= ent) + respectively. In order to add a capability of selecting the strobe signal + source (e.g. CPU or camera sensor) there is an additional switch require= d, + independent of the flash chip. The switch is controlled with pin control. + +properties: + compatible: + const: skyworks,aat1290 + + enset-gpios: + maxItems: 1 + description: EN_SET pin + + flen-gpios: + maxItems: 1 + description: FL_EN pin + + led: + $ref: common.yaml# + unevaluatedProperties: false + + properties: + led-max-microamp: true + + flash-max-microamp: + description: | + Maximum flash LED supply current can be calculated using followi= ng + formula:: I =3D 1A * 162 kOhm / Rset. + + flash-max-timeout-us: + description: | + Maximum flash timeout can be calculated using following formula:: + T =3D 8.82 * 10^9 * Ct. + + required: + - flash-max-microamp + - flash-max-timeout-us + - led-max-microamp + + pinctrl-names: + items: + - const: default + - const: host + - const: isp + + pinctrl-0: true + pinctrl-1: true + pinctrl-2: true + +required: + - compatible + - enset-gpios + - flen-gpios + - led + +additionalProperties: false + +examples: + - | + #include + #include + + // Ct =3D 220 nF, Rset =3D 160 kOhm + led-controller { + compatible =3D "skyworks,aat1290"; + flen-gpios =3D <&gpj1 1 GPIO_ACTIVE_HIGH>; + enset-gpios =3D <&gpj1 2 GPIO_ACTIVE_HIGH>; + + pinctrl-names =3D "default", "host", "isp"; + pinctrl-0 =3D <&camera_flash_host>; + pinctrl-1 =3D <&camera_flash_host>; + pinctrl-2 =3D <&camera_flash_isp>; + + led { + function =3D LED_FUNCTION_FLASH; + color =3D ; + led-max-microamp =3D <520833>; + flash-max-microamp =3D <1012500>; + flash-max-timeout-us =3D <1940000>; + }; + }; --=20 2.34.1